CVE-2026-13577
Deferred Deferred - Pending Action

Predictable Session ID Generation in Dancer2

Vulnerability report for CVE-2026-13577, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-20

Last updated on: 2026-07-20

Assigner: CPANSec

Description

Dancer2 versions through 2.1.0 for Perl generate insecure session ids when CSPRNG modules are unavailable. Dancer2::Core::Role::SessionFactory::generate_id silently falls back to a built-in rand-derived session id when both Math::Random::ISAAC::XS and Crypt::URandom are unavailable. 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-20
Last Modified
2026-07-20
Generated
2026-07-21
AI Q&A
2026-07-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
perl_dancer dancer2 2.1.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-340 The product uses a scheme that generates numbers or identifiers that are more predictable than required.
CWE-338 The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Dancer2 versions through 2.1.0 for Perl generate insecure session IDs when cryptographically secure random number generator (CSPRNG) modules are unavailable. The module Dancer2::Core::Role::SessionFactory::generate_id falls back to a weak session ID derived from low-entropy sources like the built-in rand function, which is seeded with only 32 bits and considered insecure for security applications. These predictable session IDs could allow attackers to gain unauthorized access to systems.

Detection Guidance

Check if Dancer2 versions through 2.1.0 are installed by running: perl -MDancer2 -e 'print $Dancer2::VERSION' on your system. Inspect session ID generation logic in Dancer2::Core::Role::SessionFactory for fallback to rand-derived IDs when CSPRNG modules are missing.

Impact Analysis

If you use Dancer2 versions through 2.1.0 without CSPRNG modules installed, attackers could predict session IDs and hijack user sessions. This could lead to unauthorized access to sensitive data, account takeovers, or other malicious activities depending on the application's functionality.

Compliance Impact

This vulnerability could lead to unauthorized access to personal or sensitive data, violating GDPR's data protection principles and HIPAA's security requirements for protected health information. Organizations may face compliance violations, legal penalties, and reputational damage if exploited.

Mitigation Strategies

Upgrade Dancer2 to a version beyond 2.1.0 where insecure session ID generation is fixed. Install required CSPRNG modules like Math::Random::ISAAC::XS or Crypt::URandom to ensure secure session IDs are generated by default.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-13577. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart