All vulnerabilities

Servers and applications

GHSA-3jhr-mxmx-38cx

Publishers can read account password hashes and reset tokens through the Twig sandbox

Severity
High
Published
10 Aug 2026
Last changed
31 Oct 2026
Added to UpHeron
3 Nov 2026
Fixed in
2.2.18
Weakness
Information exposure (CWE-200)Incorrect authorization (CWE-863)
Sources
Project advisories (GitHub)

Description

Grav's default Twig sandbox policy allow-lists offsetGet() and offsetExists() on account objects. offsetGet() returns whichever field is named, so sandboxed page content that has an account object in its context reads hashed_password, the 2FA secrets (secret, twofa_secret) and the pending password reset token (reset). Plugins that ship with Grav hand account objects to page content, which lets a page editor (publisher) read every account's password hash and reset token and take over the super admin account once password reset mail works.

This advisory was originally published as Moderate with Grav 2.0.16 listed as the patched release. That was wrong: no code change landed in 2.0.16 or in any release up to and including 2.2.17. The affected range, the patched version and the severity are corrected here, and the delivery paths below are new.

From getgrav/grav's security advisory. Shortened; the full text is there.

Workarounds

None tested. Upgrade to Grav 2.2.18.

Workarounds as given by getgrav/grav's security advisory.

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • From 2.0.0-beta.2 before 2.2.18

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
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

References