How to fix: Deprecated Cipher or Hash Algorithm in Page Code
Weak or broken cryptographic algorithms in client-side JavaScript.
Why it matters
Weak cryptography provides a false sense of security. MD5/SHA-1 can be forged, DES/RC4 broken, Math.random() is predictable.
Cryptographic algorithms become weak as computing power increases. MD5 collisions can be generated in seconds.
How to fix it
- 1Replace MD5/SHA-1 with SHA-256 or SHA-3.
- 2Replace DES/RC4 with AES-256-GCM.
- 3Use crypto.getRandomValues() instead of Math.random().
- 4Use the SubtleCrypto API.
Code examples
Web Crypto API
// BAD: Math.random().toString(36);
// GOOD:
const array = new Uint8Array(32);
crypto.getRandomValues(array);
const token = Array.from(array, b => b.toString(16).padStart(2, '0')).join('');References
Detected automatically by VulnRadar. The check id is weak-crypto, stable across every scan so you can filter or diff on it.
More content checks
- MediumPotential Open Redirect Parameters
- HighDirectory Listing Appears Enabled
- MediumSensitive File References Detected
- HighPotentially Outdated JavaScript Libraries
- Inforobots.txt Present - Review Manually
- InfoCMS / Technology Fingerprinting
- MediumPotentially Dangerous Inline JavaScript
- LowServer version disclosed in response header
Questions
- How severe is Deprecated Cipher or Hash Algorithm in Page Code?
- VulnRadar rates this high severity in the content category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id weak-crypto, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Deprecated Cipher or Hash Algorithm in Page Code map to?
- It maps to CWE-327. In the OWASP Top 10 it falls under A02:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.