Servers and applications
GHSA-pp89-h475-7gj6
Editor-authored Twig can read a visiting admin's session cookie, and the shared page-content cache replays it to anonymous visitors
- Severity
- High 8.0
- Published
- 9 Sept 2026
- Last changed
- 9 Sept 2026
- Added to UpHeron
- 3 Nov 2026
- Weakness
- Information exposure (CWE-200)
- Attack
- Over the network · Needs a user account · Needs someone to click or open something
- Attacker can
- Read data · Change data · Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H- Sources
- Project advisories (GitHub)
Description
Grav renders editor-authored Twig inside page content through a sandbox that permits get_cookie(), so a page can read any cookie sent with the current request — including the session cookie that authenticates the visitor. Grav then stores the finished, post-Twig output in a page-content cache keyed on page identity and the configuration checksum, with no session, user or request dimension, and no bypass for authenticated visitors.
An account holding only page-write permission can therefore publish a page that captures the session identifier of the next administrator who views it, and hand that identifier to an unauthenticated attacker on the following request. Replaying the cookie authenticates as that administrator.
Three behaviours combine.
1. Sandboxed page content may read arbitrary request cookies. GravExtension registers get_cookie and the implementation applies no name allowlist and no authorization check:
Workarounds
Set either security.twig_content.process_enabled: false to close the content-Twig gate entirely, or system.pages.never_cache_twig: true to keep the gate open while preventing rendered Twig from entering the shared cache. Either one alone breaks the chain. Afterwards run bin/grav clear to discard already-poisoned entries, and rotate administrator sessions.
Affected software
| Software | Affected versions |
|---|---|
GravServers and applications · github:getgrav/grav |
|
About Grav
free software content management system written in PHP
- Monthly downloads (Packagist)
- 1,748Packagist, 15 Nov 2026
- Total downloads (Packagist)
- 92,444Packagist, 15 Nov 2026
- GitHub stars
- 15,725GitHub, 15 Nov 2026
- Forks
- 1,430GitHub, 15 Nov 2026
- Latest release
- 2.2.29GitHub, 15 Nov 2026
- Released
- 11 Nov 2026GitHub
- License
- MIT LicenseWikidata
- Written in
- PHPWikidata
- First published on GitHub
- 2 Aug 2014GitHub
Vulnerabilities in Grav
- In our list
- 143
- Published in the last 12 months
- 114
- Critical, last 12 months
- 9
- High, last 12 months
- 76
- Known exploited
- 0
- GHSA-qgmc-p8w7-7x5pGrav 1.7: a user manager without super-admin access can take over a super-admin account from the classic admin Accounts pageHigh 7.2 19 Nov 2026
- CVE-2026-130749Grav 2.0.0 before 2.2.18 Unbounded Cache Growth via Host HeaderHigh 8.7 18 Nov 2026
- CVE-2026-130748Grav from 2.0.0 before 2.2.18 Password Reset Poisoning via CloudFront-Forwarded-ProtoHigh 8.7 18 Nov 2026
- CVE-2026-130747Grav before 1.7.53.7 and 2.x before 2.2.18 Authentication Bypass via First-Run SetupCritical 9.2 18 Nov 2026
- CVE-2026-130746Grav before 2.2.18 Session Hijacking via Shared-Cacheable Media ResponsesHigh 7.7 18 Nov 2026
- CVE-2026-130744Grav 2.0.0 before 2.2.18 RCE via Host Header Environment FolderHigh 8.7 18 Nov 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-pp89-h475-7gj6
- github.com https://github.com/getgrav/grav/security/advisories/GHSA-pp89-h475-7gj6