CVE-2025-15604
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAmon2 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe Amon2 Perl framework's random_string() function uses a cryptographically weak fallback when /dev/urandom is unavailable, generating session IDs, cookie secrets, and CSRF tokens using a SHA-1 hash seeded with the predictable built-in rand() function, PID (small set), and guessable epoch time (potentially leaked from HTTP Date headers). This makes security tokens predictable and exploitable for session hijacking or CSRF attacks.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 6.17CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Amon2 versionRun 'perl -MAmon2 -e 'print Amon2->VERSION'' or check your cpanfile/cpanfile.snapshot for 'Tokuhirom::Amon2' versionAffected if Version is lower than 6.17 (e.g., 6.16, 6.15, etc.)
-
Check if /dev/urandom is availableRun 'test -r /dev/urandom && echo Available || echo Unavailable' on the server where the application runsAffected if /dev/urandom is unavailable or unreadable by the web server process - only then does the weak fallback code path execute
-
Identify applications using Amon2Search project files for 'use Amon2' or 'use Amon2::Web' statements in Perl source files, or check for Amon2 in application dependency listsAffected if Your application imports or inherits from Amon2 modules
-
Check if random_string is used for security tokensSearch source code for calls to 'random_string' that generate session IDs, cookie secrets, or CSRF tokens - examine templates and controller logic for $c->random_string or $c->get_csrf_token patternsAffected if Your application calls random_string() to generate session identifiers, authentication cookies, or CSRF tokens without an external secure random source
-
Check token generation configurationInspect your Amon2 application configuration files for session or security settings, and look for custom random_string implementations that may override the defaultAffected if Tokens are generated using Amon2's built-in random_string without a custom secure override
Your environment is affected if you run any Amon2 version below 6.17 AND your application uses random_string() to generate session IDs, cookie secrets, or CSRF tokens on a system where /dev/urandom is unavailable.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped6.17
Upgrade Amon2 to version 6.17 or later which implements a cryptographically secure random_string function. Review and regenerate any existing session IDs, cookie secrets, and CSRF tokens that may have been generated with vulnerable versions.
Amon2 version 6.17 or later
- Check current installed version of Amon2 (e.g., `cpan -D Amon2` or inspect your cpanfile)
- Upgrade to version 6.17 or later using your Perl package manager (e.g., `cpanm [email protected]` or `cpanupgrade Amon2`)
- Verify the upgrade was successful by checking the installed version
- Review your application code that uses random_string() for session IDs, cookie secrets, or CSRF tokens to ensure they are now using cryptographically secure random values
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,392.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-15604 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-15604 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data