Intel

AIKIDO-2026-565301

gregwar/captcha is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 15, 2026
July 15, 2026

54

CVSS Score

Medium

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the gregwar/captcha library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Versions

1.0.0 - 2.0.0

Fixed in 2.1.0

Background info

gregwar/captcha is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in versions 1.0.0 - 2.0.0.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea