Cryptography
ECB mode, static IVs, weak key sizes, disabled certificate validation, weak PRNGs, JWT algorithm none attack, and hardcoded encryption keys.
7 vulnerabilities
ECB Mode
mediumUsing ECB (Electronic Codebook) mode for encryption produces identical ciphertext blocks for identical plaintext blocks, revealing patterns in the encrypted data.
Static IV/Nonce
highUsing a hardcoded or constant Initialization Vector (IV) or nonce for encryption defeats the purpose of the IV and allows attackers to detect patterns and decrypt data.
Weak Key Size
mediumUsing cryptographic keys shorter than recommended minimums (RSA less than 2048 bits, AES less than 128 bits) makes encryption vulnerable to brute-force attacks with modern hardware.
Certificate Validation Disabled
criticalDisabling TLS certificate validation with NODE_TLS_REJECT_UNAUTHORIZED=0 or rejectUnauthorized: false allows man-in-the-middle attacks on all HTTPS connections.
Weak PRNG for Security
highUsing Math.random() or Date.now() to generate tokens, session IDs, or reset codes produces predictable values that attackers can guess or reproduce.
JWT Algorithm None
criticalAccepting 'none' as a valid JWT signing algorithm lets attackers forge tokens without a secret key.
Hardcoded Encryption Key
highEmbedding encryption keys as string literals in code means anyone with repo access can decrypt your data.