gregwar/captcha is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
54
CVSS Score
Medium
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The PhraseBuilder component generates CAPTCHA phrases by picking characters from the configured charset. Character selection uses array_rand, which relies on PHP's non-cryptographic Mersenne Twister generator. Because that generator is not cryptographically secure, the generated CAPTCHA phrases are more predictable, weakening the anti-automation protection and making CAPTCHA bypass easier. The fix selects characters with random_int and adds charset validation, falling back to the old behavior only when secure randomness is unavailable.
Upgrade the gregwar/captcha library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
1.0.0 - 2.0.0
Fixed in 2.1.0gregwar/captcha is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in versions 1.0.0 - 2.0.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.