{"id":"CVE-2026-13577","state":"PUBLISHED","title":"Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable","description":"Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable.\n\nDancer2::Core::Role::SessionFactory::generate_id silently falls back to a built-in rand-derived session id unless both Math::Random::ISAAC::XS and Crypt::URandom are available.\n\nThe fallback session id is generated from a SHA-1 hash of a call to the built-in rand function, the absolute path of the Dancer2::Core::Role::SessionFactory module, an internal counter, the process id, the module instance memory address, and a shuffled string of characters (using the List::Util::shuffle function, which also uses the built-in rand function).\n\nThese are all low-entropy and easily guessed sources.\n\nThe built-in rand() function is seeded with 32-bits and considered unsuitable for security applications.\n\nPredictable session ids could allow an attacker to gain access to systems.","publishedAt":"2026-07-20T07:11:10.403Z","updatedAt":"2026-09-20T10:17:51.905Z","severity":{"score":8.2,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","source":"CISA-ADP"},"assigner":"CPANSec","products":["Dancer2"],"affected":[{"packageName":"Dancer2","packageURL":"pkg:cpan/Dancer2","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"2.2.0","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["Dancer2"],"programFiles":["lib/Dancer2/Core/Role/SessionFactory.pm"],"programRoutines":[{"name":"Dancer2::Core::Role::SessionFactory::generate_id"}],"repo":"https://github.com/PerlDancer/Dancer2"}],"references":["https://metacpan.org/release/CROMEDOME/Dancer2-2.2.0/changes","https://github.com/PerlDancer/Dancer2/issues/1807","https://github.com/PerlDancer/Dancer2/pull/1804","https://github.com/PerlDancer/Dancer2/blob/v2.1.0/lib/Dancer2/Core/Role/SessionFactory.pm#L142","https://www.cve.org/CVERecord?id=CVE-2026-5080"],"weaknesses":["CWE-340","CWE-338"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/13xxx/CVE-2026-13577.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-13577","state":"PUBLISHED","datePublished":"2026-07-20T07:11:10.403Z","dateUpdated":"2026-09-20T10:17:51.905Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-06-28T20:59:07.978Z"},"containers":{"cna":{"title":"Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable","descriptions":[{"lang":"en","value":"Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable.\n\nDancer2::Core::Role::SessionFactory::generate_id silently falls back to a built-in rand-derived session id unless both Math::Random::ISAAC::XS and Crypt::URandom are available.\n\nThe fallback session id is generated from a SHA-1 hash of a call to the built-in rand function, the absolute path of the Dancer2::Core::Role::SessionFactory module, an internal counter, the process id, the module instance memory address, and a shuffled string of characters (using the List::Util::shuffle function, which also uses the built-in rand function).\n\nThese are all low-entropy and easily guessed sources.\n\nThe built-in rand() function is seeded with 32-bits and considered unsuitable for security applications.\n\nPredictable session ids could allow an attacker to gain access to systems."}],"affected":[{"packageName":"Dancer2","packageURL":"pkg:cpan/Dancer2","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"2.2.0","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["Dancer2"],"programFiles":["lib/Dancer2/Core/Role/SessionFactory.pm"],"programRoutines":[{"name":"Dancer2::Core::Role::SessionFactory::generate_id"}],"repo":"https://github.com/PerlDancer/Dancer2"}],"references":[{"url":"https://metacpan.org/release/CROMEDOME/Dancer2-2.2.0/changes","tags":["release-notes"]},{"url":"https://github.com/PerlDancer/Dancer2/issues/1807","tags":["issue-tracking"]},{"url":"https://github.com/PerlDancer/Dancer2/pull/1804","tags":["issue-tracking"]},{"url":"https://github.com/PerlDancer/Dancer2/blob/v2.1.0/lib/Dancer2/Core/Role/SessionFactory.pm#L142"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-5080","tags":["related"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-340","description":"CWE-340 Generation of Predictable Numbers or Identifiers","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-338","description":"CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-09-20T10:17:51.905Z"},"impacts":[{"capecId":"CAPEC-115","descriptions":[{"lang":"en","value":"CAPEC-115 Authentication Bypass"}]}],"solutions":[{"lang":"en","value":"Upgrade to Davcer2 2.2.0 or later."}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2026-07-20T00:00:00.000Z","value":"CVE-2026-13577 published."},{"lang":"en","time":"2026-09-18T00:00:00.000Z","value":"Version 2.2.0 released with fix."}],"workarounds":[{"lang":"en","value":"For deployments that cannot upgrade, ensure Crypt::URandom and Math::Random::ISAAC::XS modules are installed in the application PERL5LIB path."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":8.2,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"LOW"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-07-20T13:05:03.182340Z","id":"CVE-2026-13577","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-20T13:05:10.916Z"}}]}}}