{"id":"CVE-2025-40923","published":"2025-07-16T13:05:03Z","modified":"2025-11-04T21:10:20Z","title":"Plack-Middleware-Session before version 0.35 for Perl generates session ids insecurely","vendor":"MIYAGAWA","product":"Plack::Middleware::Session","tier":"tail","description":{"text":"Plack-Middleware-Session before version 0.35 for Perl generates session ids insecurely.\n\nThe 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.\n\nPredicable session ids could allow an attacker to gain access to systems.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00387,"percentile":0.33634,"provenance":"source"},"cwes":[{"id":"CWE-340","name":"Generation of Predictable Numbers or Identifiers"},{"id":"CWE-338","name":"Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)"}],"references":[{"url":"https://metacpan.org/release/MIYAGAWA/Plack-Middleware-Session-0.34/source/lib/Plack/Session/State.pm#L22","tags":[]},{"url":"https://github.com/plack/Plack-Middleware-Session/pull/52","tags":[]},{"url":"https://github.com/plack/Plack-Middleware-Session/commit/1fbfbb355e34e7f4b3906f66cf958cedadd2b9be.patch","tags":["patch"]},{"url":"https://security.metacpan.org/docs/guides/random-data-for-security.html","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/07/16/4","tags":[]}],"priority":{"score":11.8,"factors":[{"name":"EPSS percentile","points":6.73},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"miyagawa","affectedVersions":[{"vendor":"MIYAGAWA","product":"Plack::Middleware::Session","versions":[">= 0.01, < 0.35"]}],"solutions":{"items":["Users are advised to upgrade to Plack-Middleware-Session v0.35 or later."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-07-16T20:47:49.157521Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-21693","exploited":false,"provenance":"source"}}