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.
Published: 2026-08-22
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized access by session cookie forgery
Action: Immediate Patch
AI Analysis

Impact

Punk versions before 0.18 use an empty default HMAC key when a session is declared without a secret. When the secret option is omitted or set to an empty value, the session cookie is signed and verified with a zero‑length HMAC‑SHA256 key. An attacker who understands the cookie format can create a forgery that contains any desired session data, such as a user identifier or role, and the application will accept it as valid. This breaks the integrity of the session and allows an attacker to impersonate any user or elevate privileges without detection at runtime.

Affected Systems

The vulnerability affects the Punk web framework distributed through CPAN. Versions prior to 0.18 of the Punk module in Perl are impacted. Deployments using the Punk module without a configured session secret, or with an empty secret, are subject to cookie forgery.

Risk and Exploitability

The EPSS score is <1%, and the CVSS score is 9.1, indicating a critical severity. The vulnerability is not listed in the CISA KEV catalog. The lack of a runtime warning or startup error allows attackers to generate compliant cookies offline and use them in remote HTTP requests to the affected application. The likely attack vector is a remote network request where the attacker supplies a forged cookie. Because the flaw permits arbitrary session state creation, the risk is high for privilege escalation and unauthorized access when the application cannot verify the authenticity of session data.

Generated by OpenCVE AI on August 26, 2026 at 03:40 UTC.

Remediation

Vendor Solution

Upgrade to Punk 0.18 or later.


Vendor Workaround

For deployments that cannot upgrade to 0.18, declare the session keyword with a non-empty secret. The secret keyword fails closed, so sourcing the key through it turns a missing configuration path or an unset environment variable into a startup error.


OpenCVE Recommended Actions

  • Upgrade the Punk module to version 0.18 or later.
  • If an upgrade is not immediately possible, configure the session keyword with a non‑empty secret value. The secret keyword will fail closed, turning missing or empty values into a startup error and preventing the usage of an empty HMAC key.
  • Review existing Punk configurations and ensure that all session declarations provide a secret, and validate that the HMAC key is non‑empty before deploying the application.

Generated by OpenCVE AI on August 26, 2026 at 03:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sun, 23 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Punk
Punk punk
Vendors & Products Punk
Punk punk

Sat, 22 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
References

Sat, 22 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
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.
Title 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
Weaknesses CWE-1394
References

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-25T19:28:36.443Z

Reserved: 2026-08-18T11:59:49.642Z

Link: CVE-2026-75870

cve-icon Vulnrichment

Updated: 2026-08-22T19:07:10.053Z

cve-icon NVD

Status : Deferred

Published: 2026-08-22T14:16:33.813

Modified: 2026-08-26T16:51:19.490

Link: CVE-2026-75870

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T03:45:03Z

Weaknesses
  • CWE-1394

    Use of Default Cryptographic Key