CVE-2025-15604 Details
Description
Amon2 versions before 6.17 for Perl use an insecure random_string implementation for security functions. In versions 6.06 through 6.16, the random_string function will attempt to read bytes from the /dev/urandom device, but if that is unavailable then it generates bytes by concatenating a SHA-1 hash seeded with the built-in rand() function, the PID, and the high resolution epoch time. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Before version 6.06, there was no fallback when /dev/urandom was not available. Before version 6.04, the random_string function used the built-in rand() function to generate a mixed-case alphanumeric string. This function may be used for generating session ids, generating secrets for signing or encrypting cookie session data and generating tokens used for Cross Site Request Forgery (CSRF) protection.
A vulnerability exists in Amon2 versions prior to 6.17 for Perl, where the random_string function used for security purposes does not generate cryptographically secure random values. In versions 6.06 through 6.16, the function attempts to read from /dev/urandom, but falls back on a method that concatenates a SHA-1 hash seeded with the unreliable rand() function, the process ID, and the high-resolution epoch time. This fallback is predictable, as the PID comes from a limited range and the epoch time can be guessed or inferred from the HTTP Date header. Prior to version 6.06, the function lacked a fallback for random generation when /dev/urandom was unavailable, and before version 6.04, it relied solely on the rand() function to create a mixed-case alphanumeric string. This flawed random string generation may be exploited in scenarios where secure tokens are required, such as session IDs, cookie encryption or signing secrets, and Cross-Site Request Forgery (CSRF) tokens.
Users can upgrade to Amon2 version 6.17 or later, where the random_string implementation has been replaced with a secure version that uses Crypt::SysRandom. Instructions for upgrading can be found in the Amon2 GitHub repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 1, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/tokuhirom/Amon/pull/135 | CPANSec | Issue TrackingPatch |
| https://metacpan.org/release/TOKUHIROM/Amon2-6.17/changes | CPANSec | Product |
| https://metacpan.org/release/TOKUHIROM/Amon2-6.17/diff/TOKUHIROM/Amon2-6.16#lib/Amon2/Util.pm | CPANSec | Product |
| https://security.metacpan.org/docs/guides/random-data-for-security.html | CPANSec | Third Party Advisory |
| http://www.openwall.com/lists/oss-security/2026/03/28/4 | CVE | Mailing ListThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
| CWE-340 | Generation of Predictable Numbers or Identifiers | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| tokuhirom amon2 | < 6.17 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 1, 2026 | CVE Modified | CISA-ADP |
| Mar 31, 2026 | Initial Analysis | [email protected] |
| Mar 28, 2026 | CVE Modified | CVE |
| Mar 28, 2026 | New CVE Received | CPANSec |