CVE-2026-72702

Grav CMS before 2.0.16 Origin Validation Bypass via Referer

Published Aug 25, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
Grav CMS before 2.0.16 contains an origin validation bypass in the Uri::referrer() and Pages::referrerRoute() methods, which validate the Referer header using an unanchored string prefix match (str_starts_with($referrer, $base)) with no trailing delimiter. An attacker who controls a domain that begins with the victim site's origin (e.g. https://example.com.attacker.tld) can send a request with such a Referer to be treated as same-origin, bypassing the Referer-based origin check.

Analysis

AI-generated

Technical impact

The vulnerability arises from an unanchored prefix comparison of the HTTP Referer header, allowing an attacker to craft a Referer that starts with the victim site's origin yet has a different domain (e.g., https://example.com.attacker.tld). The same‑origin check, intended to mitigate cross‑site request forgery and other origin‑based protections, is incorrectly satisfied when the prefix matches, thereby granting the attacker the privileges normally reserved for same‑origin requests. This can lead to unintended execution of privileged actions, data disclosure, or further compromise depending on what authentication and permission checks rely on the origin check.

Affected Systems

Grav CMS products released before version 2.0.16 from the getgrav:grav vendor are affected. Any site running the legacy Grav CMS prior to the 2.0.16 update is vulnerable.

Risk and Exploitability

The CVSS score of 9.3 reflects the high impact of the flaw; the EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog. If an attacker can control a domain that prefixes the victim origin, they can inject a forged Referer header in an HTTP request. This bypass removes the same‑origin safeguard and can be used to perform CSRF or abuse any feature that depends on the origin check. The attack does not require privileged access beyond the ability to send HTTP requests, but it demands control over a domain name that shares the initial characters of the target site's origin.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Grav CMS to version 2.0.16 or later, which corrects the Referer validation logic.
  • Verify that the application’s referer checking conforms to the fixed logic, ensuring that the string comparison is anchored or that the full Origin header is validated.
  • If a patch cannot be applied immediately, consider temporarily disabling referer‑based origin checks for sensitive routes or enforce a stricter comparison (reject any referer that does not exactly match the canonical site URL).

Generated by OpenCVE AI on August 25, 2026 at 03:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9ccq-2jfg-qw33 Grav: Origin validation bypass in Uri::referrer() and Pages::referrerRoute() via unanchored prefix match
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description Grav CMS before 2.0.16 contains an origin validation bypass in the Uri::referrer() and Pages::referrerRoute() methods, which validate the Referer header using an unanchored string prefix match (str_starts_with($referrer, $base)) with no trailing delimiter. An attacker who controls a domain that begins with the victim site's origin (e.g. https://example.com.attacker.tld) can send a request with such a Referer to be treated as same-origin, bypassing the Referer-based origin check.
Title Grav CMS before 2.0.16 Origin Validation Bypass via Referer
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-346
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Aug 10, 2026, 1:02 PM
Status
Deferred
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM