Vulnerability · Published Jul 20, 2026 · Assigned by CPANSec

CVE-2026-13577Dancer2 versions before 2.2.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable

High 8.2

In plain English

A high-severity security flaw in Dancer2. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.2High
Exploit odds (30 days)0.6%top 52.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12libdancer2-perlno fix listedDEBIAN-CVE-2026-13577
Debian:13libdancer2-perlno fix listedDEBIAN-CVE-2026-13577
Debian:14libdancer2-perl2.2.2-1DEBIAN-CVE-2026-13577
Ubuntu:22.04:LTSlibdancer2-perlno fix listedUBUNTU-CVE-2026-13577
Ubuntu:24.04:LTSlibdancer2-perlno fix listedUBUNTU-CVE-2026-13577
Ubuntu:26.04:LTSlibdancer2-perlno fix listedUBUNTU-CVE-2026-13577
Ubuntu:26.10libdancer2-perlno fix listedUBUNTU-CVE-2026-13577

Affected products (as reported)

VendorProductVersions
Dancer2 0 – before 2.2.0

Weakness: CWE-340, CWE-338 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

References