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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| getgrav | grav | < 2.0.16 | 2.0.16 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | getgrav/grav | < 2.0.16 | 2.0.16 | GHSA-9ccq-2jfg-qw33 |
References
- GitHub Security Advisory (GHSA-9ccq-2jfg-qw33) vendor-advisory
- VulnCheck Advisory: Grav CMS before 2.0.16 Origin Validation Bypass via Referer third-party-advisory