CVE-2025-40916: GRYPHON Mojolicious::Plugin::CaptchaPNG · Use of Cryptographically Weak Pseudo-Random Number Generator
Affects GRYPHON Mojolicious::Plugin::CaptchaPNGSource CVE Database V5
Not known to be exploited · CVSS 9.1 Critical.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 36% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 16 Jun 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| GRYPHON Mojolicious::Plugin::CaptchaPNG | Affected
| Fixed in– |
AI-suggested
Immediate mitigation should focus on replacing the insecure rand() function with a cryptographically secure pseudo-random number generator (CSPRNG). In Perl, this can be achieved by using modules such as Crypt::PRNG or leveraging system sources of entropy like /dev/urandom or the Crypt::Random module. Developers should update the CAPTCHA generation logic to use these secure sources for both the CAPTCHA text and image noise. Until an official patch is released, organizations should consider disabling the Mojolicious::Plugin::CaptchaPNG 1.05 or replacing it with alternative CAPTCHA solutions that use secure randomness. Additionally, implementing multi-layered bot mitigation strategies such as rate limiting, IP reputation checks, and behavioral analysis can reduce the risk of automated abuse. Monitoring web application logs for unusual patterns of CAPTCHA failures or repeated automated requests can help detect exploitation attempts. Organizations should also review their dependency management processes to quickly identify and update vulnerable components. Finally, educating developers about the importance of cryptographically secure randomness in security controls is essential to prevent similar issues.
Description
Mojolicious::Plugin::CaptchaPNG version 1.05 for Perl uses a weak random number source for generating the captcha. That version uses the built-in rand() function for generating the captcha text as well as image noise, which is insecure.
References
- metacpan.org/release/GRYPHON/Mojolicious-Plugin-CaptchaPNG-1.04/diff/GRYPHON/Mojolicious-Plugin-CaptchaPNG-1.05/lib/Mojolicious/Plugin/CaptchaPNG.pm (opens in a new tab)
- metacpan.org/release/GRYPHON/Mojolicious-Plugin-CaptchaPNG-1.06/changes (opens in a new tab)
- metacpan.org/pod/perlfunc (opens in a new tab)
- security.metacpan.org/docs/guides/random-data-for-security.html (opens in a new tab)