CVE-2026-13577 Details
Description
Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable. Dancer2::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. The 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). These are all low-entropy and easily guessed sources. The built-in rand() function is seeded with 32-bits and considered unsuitable for security applications. Predictable session ids could allow an attacker to gain access to systems.
A vulnerability exists in Dancer2 versions through 2.1.0 and in Dancer::Session::Abstract versions through 1.3522 for Perl, where session IDs are generated insecurely. This issue arises when cryptographically secure random number generator (CSPRNG) modules are unavailable. In Dancer2, the session ID generation falls back to a method derived from the built-in random function, which is low-entropy and easily guessable. Similarly, Dancer::Session::Abstract generates session IDs by concatenating predictable elements such as the absolute pathname, process ID, epoch time, and calls to the rand() function, which is also considered insecure. The lack of entropy in the session ID generation could allow attackers to predict session IDs and gain unauthorized access to systems.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 20, 2026CISA-ADP
Assessed Jul 20, 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/PerlDancer/Dancer2/blob/v2.1.0/lib/Dancer2/Core/Role/SessionFactory.pm#L142 | CPANSec | Source CodeVendor |
| https://github.com/PerlDancer/Dancer2/issues/1807 | CPANSec | |
| https://github.com/PerlDancer/Dancer2/pull/1804 | CPANSec | |
| https://metacpan.org/release/CROMEDOME/Dancer2-2.2.0/changes | CPANSec | |
| https://www.cve.org/CVERecord?id=CVE-2026-5080 | CPANSec | Not Applicable |
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 |
|---|---|
| Dancer2 | <= 2.1.0 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 24, 2026 | CVE Translated | [email protected] |
| Sep 20, 2026 | CVE Modified | CPANSec |
| Jul 22, 2026 | CVE Modified | CPANSec |
| Jul 20, 2026 | CVE Modified | CISA-ADP |
| Jul 20, 2026 | New CVE Received | CPANSec |
Volerion