crypto-mechanism-bypass
CriticalWhat it is
Cryptographic protection is negated because secrets, keys, or authentication logic are exposed in client-side JavaScript or HTML. An attacker who reads the page source can bypass the protection entirely.Why it matters
Any secret placed in client-side code is effectively public. API keys, encryption keys, hardcoded passwords, or client-side password comparisons provide zero security — they’re visible to every user who opens DevTools.How QAOS detects it
The agent scans all JavaScript loaded by the page for patterns indicating exposed secrets:- Hardcoded API keys (
sk_live_,api_key =,apiKey:,secret =) - Client-side password comparisons (
if (password === 'admin123')) - Encryption keys stored as JS constants
- Hidden
<input>elements withname="secret"ordata-api-keyattributes - Expected password hashes in JavaScript for local comparison
Examples
How to fix
Never place secrets in client-side code. All authentication and cryptographic operations must happen server-side. Use environment variables loaded server-side only. For API keys that must be client-side (e.g., Stripe publishable keys), use restricted, scope-limited keys that cannot perform sensitive operations.unencrypted-page-serving
CriticalWhat it is
The web page itself is served over plain HTTP instead of HTTPS, meaning all traffic between the user’s browser and the server is transmitted in the clear.Why it matters
HTTP traffic can be intercepted, read, and modified by anyone on the network path — including ISPs, coffee shop Wi-Fi operators, and corporate network proxies. All credentials, session cookies, and sensitive data submitted over HTTP are exposed.How QAOS detects it
The agent checks whether the current page URL starts withhttp:// instead of https://.
How to fix
- Obtain a TLS certificate (free via Let’s Encrypt)
- Configure your server to serve all content over HTTPS
- Redirect all HTTP traffic to HTTPS:
- Add HSTS to prevent future HTTP connections (see
misconfigured-security-headers)
weak-crypto-key-generation
HighWhat it is
Client-side JavaScript usesMath.random() or other non-cryptographic functions to generate session tokens, keys, or security-sensitive identifiers. Alternatively, deprecated algorithms like DES, RC4, or MD5 are used for cryptographic purposes.
Why it matters
Math.random() is not cryptographically secure — its output can be predicted from a small number of observed values. Tokens generated with it can be brute-forced in seconds. Deprecated algorithms have known vulnerabilities that can be exploited with modest computing resources.
How QAOS detects it
The agent scans JavaScript source for:Math.random()used to generate tokens or keysCryptoJS.MD5()orCryptoJS.SHA1()for key derivation- RSA key generation with modulus < 2048 bits
- Use of DES, RC4, or other deprecated cipher names
Examples
How to fix
unencrypted-sensitive-communication
HighWhat it is
Forms or JavaScriptfetch/XHR calls submit sensitive data (passwords, credit card numbers, personal information) to http:// endpoints instead of https://.
Why it matters
Even if the page itself is served over HTTPS, if form submissions or API calls go to HTTP endpoints, the sensitive data is transmitted in the clear. This is particularly dangerous for login forms and payment flows.How QAOS detects it
The agent scans JavaScript source and formaction attributes for http:// URLs that receive sensitive data (forms containing password fields, credit card inputs, or personal data fields).
Examples
How to fix
Ensure all formaction attributes and API call URLs use https://. Configure your server to reject HTTP requests for sensitive endpoints.
misconfigured-security-headers
HighWhat it is
HTTP response headers that protect against common browser-side attacks are missing or misconfigured. These include HSTS, Content-Security-Policy, X-Frame-Options, and X-Content-Type-Options.Why it matters
Security headers are the browser’s last line of defense. Missing headers leave users vulnerable to downgrade attacks, clickjacking, MIME-type sniffing, and XSS escalation — even if the application code itself is secure.How QAOS detects it
The agent checks HTTP response headers for the presence and correctness of key security headers.Commonly missing headers
| Header | Risk if missing |
|---|---|
Strict-Transport-Security | HTTP downgrade attacks |
Content-Security-Policy | XSS escalation |
X-Frame-Options | Clickjacking |
X-Content-Type-Options | MIME sniffing |
Referrer-Policy | URL leakage |
How to fix
Add these headers to your server’s response:weak-hashing-no-salt
HighWhat it is
Passwords or other sensitive values are hashed using weak algorithms (MD5, SHA-1) or without a unique random salt, making them vulnerable to rainbow table and dictionary attacks.Why it matters
Unsalted MD5 or SHA-1 hashes of common passwords exist in precomputed lookup tables. An attacker who obtains your password database can instantly reverse millions of passwords.How QAOS detects it
The agent scans JavaScript source for hashing calls using weak algorithms:CryptoJS.MD5(password), CryptoJS.SHA1(data), single-round SHA-256 without iterations, or hashing without a random salt.
How to fix
Use a proper key derivation function (KDF) designed for password hashing:misconfigured-cors
HighWhat it is
The server returnsAccess-Control-Allow-Origin: * (or reflects any origin) on endpoints that return sensitive data, allowing any website to make authenticated cross-origin requests and read the response.
Why it matters
A wildcard CORS policy combined withAccess-Control-Allow-Credentials: true allows any malicious website to make requests to your API on behalf of your logged-in users and read the response. This effectively bypasses the Same-Origin Policy.
How QAOS detects it
The agent checks HTTP response headers forAccess-Control-Allow-Origin: * or reflected origin values on sensitive API endpoints.