Description
Mojolicious versions from 4.59 before 9.48 for Perl expose a stable representation of the session CSRF token to a BREACH compression oracle.

_csrf_token generates and caches one token per session and returns the same value on every call, and _csrf_field places that value in a hidden `csrf_token` input. When a response carrying the token also echoes attacker-controlled input and is gzip-compressed, the chosen values and the resulting compressed lengths form a BREACH oracle.

An attacker able to query it can recover the token and pass csrf_protect validation.
Published: 2026-07-14
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability, classified under CWE-204 (Cacheable Information) and CWE-352 (Cross‑Site Request Forgery), allows an attacker to recover the stable session CSRF token that a Mojolicious application returns on each request and that is cached per session. The token is embedded in a hidden input field that is echoed in the response body. When the response is gzip‑compressed and also contains attacker‑controlled input, the deterministic token values and the resulting compressed lengths form a BREACH oracle. By observing the compressed size, an attacker can deduce the token value and subsequently pass csrf_protect validation, effectively bypassing the application’s CSRF defenses.

Affected Systems

Mojolicious versions from 4.59 up to, but not including, 9.48 for Perl are affected.

Risk and Exploitability

The CVSS score of 9.1 indicates a high severity vulnerability, while the EPSS score of less than 1% shows a very low exploitation probability at the time of analysis. The vulnerability is not listed in CISA’s KEV catalog. Attackers would likely need remote access to send requests and observe compressed responses, implying that a remote BREACH oracle could be leveraged to extract the CSRF token.

Generated by OpenCVE AI on July 31, 2026 at 07:46 UTC.

Remediation

Vendor Solution

Upgrade to Mojolicious 9.48 or later.


OpenCVE Recommended Actions

  • Upgrade Mojolicious to version 9.48 or later.
  • Ensure that the CSRF token is not statically cached per session but changes with each request or is otherwise protected against oracle attacks.
  • If the application must remain compressed, disable gzip compression on any responses containing CSRF token data or remove session data from compressed payloads.

Generated by OpenCVE AI on July 31, 2026 at 07:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Sri
Sri mojolicious
Vendors & Products Sri
Sri mojolicious

Wed, 15 Jul 2026 17: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'}


Tue, 14 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
Description Mojolicious versions from 4.59 before 9.48 for Perl expose a stable representation of the session CSRF token to a BREACH compression oracle. _csrf_token generates and caches one token per session and returns the same value on every call, and _csrf_field places that value in a hidden `csrf_token` input. When a response carrying the token also echoes attacker-controlled input and is gzip-compressed, the chosen values and the resulting compressed lengths form a BREACH oracle. An attacker able to query it can recover the token and pass csrf_protect validation.
Title Mojolicious versions from 4.59 before 9.48 for Perl expose a stable representation of the session CSRF token to a BREACH compression oracle
Weaknesses CWE-204
CWE-352
References

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-15T16:32:58.629Z

Reserved: 2026-07-14T15:03:43.632Z

Link: CVE-2026-15747

cve-icon Vulnrichment

Updated: 2026-07-14T19:30:12.894Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T08:00:04Z

Weaknesses
  • CWE-204

    Observable Response Discrepancy

  • CWE-352

    Cross-Site Request Forgery (CSRF)