High severityJavaScript / TypeScriptCryptographyHIGH confidence
Weak Cipher Algorithm
A broken cipher or insecure ECB mode is used for encryption.
Standards mapping
- OWASP Top 10
- A02:2021 - Cryptographic Failures
- OWASP ASVS
- V6.2.2 (L2)
Vulnerable vs. safe
Flagged by this check
const cipher = crypto.createCipheriv("des-ecb", key, iv);Passes - the safe pattern
const gcmCipher = crypto.createCipheriv("aes-256-gcm", key, iv);Why it matters & how to fix it
A broken cipher or insecure ECB mode is used for encryption. Use AES-256 in an authenticated mode such as GCM (aes-256-gcm) with a random IV per message.
References
Rule ID integsec-js-weak-cipher-algorithm - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentest