Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getgrav/grav
  4. ›
  5. CVE-2026-72702

CVE-2026-72702: Grav: Origin validation bypass in Uri::referrer() and Pages::referrerRoute() via unanchored prefix match

September 17, 2026

Grav\Common\Uri::referrer() and Grav\Common\Page\Pages::referrerRoute() both check whether an incoming request’s Referer header “came from our site” using str_starts_with($referrer, $base), where $base is the site’s own absolute root URL (for example https://example.com, no trailing slash). Because the comparison has no boundary character after the prefix, any Referer value that merely starts with that string is accepted, including a Referer from a completely different host such as https://example.com.attacker.tld.

This is the same class of bug already fixed once in 2.0.15 for the fast static asset server (GHSA-4v9q-p283-qc2m, “also allowing any neighbouring directory whose name starts with the same letters”). The identical pattern is still present in both places that trust the Referer header, and neither is covered by that fix.

References

  • github.com/advisories/GHSA-9ccq-2jfg-qw33
  • github.com/getgrav/grav/security/advisories/GHSA-9ccq-2jfg-qw33
  • nvd.nist.gov/vuln/detail/CVE-2026-72702
  • www.vulncheck.com/advisories/grav-cms-before-origin-validation-bypass-via-referer

Code Behaviors & Features

Detect and mitigate CVE-2026-72702 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.16

Fixed versions

  • 2.0.16

Solution

Upgrade to version 2.0.16 or above.

Weakness

  • CWE-346: Origin Validation Error

Source file

packagist/getgrav/grav/CVE-2026-72702.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:21:27 +0000.