CVE-2026-75870
JSON

9.1critical

Punk versions before 0.18 for Perl allow session cookie forgery via an empty default HMAC key when a session is declared without a secret

Severity
9.1critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.50% (higher than 35% of CVEs)
Published
Last changed
Assigned by
CPANSec

Description

Punk versions before 0.18 for Perl allow session cookie forgery via an empty default HMAC key when a session is declared without a secret. The session keyword freezes its options onto the application as given: it does not require a secret, warn, or refuse to start when one is absent. The cookie read and the write-back both default that key to the empty string, so a declaration with no secret option, or with an undefined or empty one, signs and verifies with a zero-length HMAC-SHA256 key. An attacker who knows the cookie format can then mint one offline carrying any contents the session holds, such as a user identifier or a role. Nothing marks the misconfiguration at runtime: cookies are well formed and sessions round-trip as expected.

Affected

Product or packageVersionsReported by
Punkbefore 0.18CVE List

Classification

CWE-1394

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

What each source says

CVE List

Punk versions before 0.18 for Perl allow session cookie forgery via an empty default HMAC key when a session is declared without a secret. The session keyword freezes its options onto the application as given: it does not require a secret, warn, or refuse to start when one is absent. The cookie read and the write-back both default that key to the empty string, so a declaration with no secret option, or with an undefined or empty one, signs and verifies with a zero-length HMAC-SHA256 key. An attacker who knows the cookie format can then mint one offline carrying any contents the session holds, such as a user identifier or a role. Nothing marks the misconfiguration at runtime: cookies are well formed and sessions round-trip as expected.

NVD (es)

Versiones de Punk anteriores a la 0.18 para Perl permiten la falsificación de cookies de sesión a través de una clave HMAC predeterminada vacía cuando se declara una sesión sin un secreto. La palabra clave session fija sus opciones en la aplicación tal como se proporcionan: no requiere un secreto, no advierte ni se niega a iniciar cuando uno está ausente. La lectura y la reescritura de la cookie establecen esa clave por defecto a la cadena vacía, por lo que una declaración sin opción de secreto, o con una indefinida o vacía, firma y verifica con una clave HMAC-SHA256 de longitud cero. Un atacante que conoce el formato de la cookie puede entonces acuñar una sin conexión que contenga cualquier contenido que la sesión almacene, como un identificador de usuario o un rol. Nada marca la mala configuración en tiempo de ejecución: las cookies están bien formadas y las sesiones completan el ciclo como se espera.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-75870 changed 2026-08-25CVE Terms of Use
NVDCVE-2026-75870 changed 2026-10-14Public domain