CVE-2026-13577
JSON

8.2high

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

Severity
8.2high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.35% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

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

Product or packageVersionsReported by
Dancer2before 2.2.0CVE List

Classification

CWE-338CWE-340

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Las versiones de Dancer2 hasta la 2.1.0 para Perl generan identificadores de sesión inseguros cuando los módulos CSPRNG requeridos no están disponibles. Dancer2::Core::Role::SessionFactory::generate_id recurre silenciosamente a un identificador de sesión derivado de la función ’rand’ incorporada a menos que Math::Random::ISAAC::XS y Crypt::URandom estén ambos disponibles. El identificador de sesión de respaldo se genera a partir de un hash SHA-1 de una llamada a la función ’rand’ incorporada, la ruta absoluta del módulo Dancer2::Core::Role::SessionFactory, un contador interno, el ID del proceso, la dirección de memoria de la instancia del módulo y una cadena de caracteres mezclada (utilizando la función List::Util::shuffle, que también usa la función ’rand’ incorporada). Todas estas son fuentes de baja entropía y fácilmente predecibles. La función ’rand()’ incorporada se inicializa con 32 bits y se considera inadecuada para aplicaciones de seguridad. Los identificadores de sesión predecibles podrían permitir a un atacante obtener acceso a los sistemas.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-13577 changed 2026-09-20CVE Terms of Use
NVDCVE-2026-13577 changed 2026-10-24Public domain