CVE-2025-40923
Plack-Middleware-Session before version 0.35 for Perl generates session ids insecurely
- Published
- Updated
- Reserved
- Assigned by
- CPANSec
Description
Plack-Middleware-Session before version 0.35 for Perl generates session ids insecurely. The default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, and the PID. 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. Predicable session ids could allow an attacker to gain access to systems.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | High7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVDNVD · Deferred | 3.1 | High7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
- EPSS (exploitation in 30 days)
- 0.39% · top 67% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.3.
Weakness
Affected products
MIYAGAWA · Plack::Middleware::Session
- affected 0.01 – < 0.35
What to do
Solution: Users are advised to upgrade to Plack-Middleware-Session v0.35 or later.
Workaround: Users who are unable to upgrade are advised to change the sid_generator attribute of Plack::Session::State to a function that returns a securely generated session id based on a secure source of entropy from the system.
References (5)
- https://metacpan.org/release/MIYAGAWA/Plack-Middleware-Session-0.34/source/lib/Plack/Session/State.pm#L22 (opens in a new tab)
- https://github.com/plack/Plack-Middleware-Session/pull/52 (opens in a new tab)
- https://github.com/plack/Plack-Middleware-Session/commit/1fbfbb355e34e7f4b3906f66cf958cedadd2b9be.patch (opens in a new tab)patch
- https://security.metacpan.org/docs/guides/random-data-for-security.html (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/07/16/4 (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2025-40923)Record last updated .