All vulnerabilities

Servers and applications

GHSA-xhgq-grcm-qmrr

Publishers can change site configuration and expose its secrets by creating folders named like configuration files

Severity
High
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
2.2.35
Weakness
CWE-15CWE-706
Sources
Project advisories (GitHub)

Description

Grav's configuration finder lists configuration files by name only, so a folder whose name ends in .yaml is loaded as if it were a configuration file. It loads as an empty array and replaces the setting it sits under with a truthy value. A page editor (publisher), or an account that can upload media through the API, creates such folders under a configuration path and switches on the PHP DebugBar for the whole site. Every anonymous page response then carries the system and plugins configuration in clear text, including the SMTP password and any plugin API keys stored there. The same trick can flip any other configuration scalar, for example enabling a disabled plugin or turning on the detailed error page.

ConfigFileFinder::detectRecursive() and detectAll() call Folder::all() with a name pattern only, and Folder::all() returns folders unless it is told otherwise. detectInFolder() also tests with file_exists(), which is true for a folder.

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

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • From 2.0.0 before 2.2.35

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
1,832Packagist, 22 Nov 2026
Total downloads (Packagist)
93,086Packagist, 22 Nov 2026
GitHub stars
15,733GitHub, 22 Nov 2026
Forks
1,428GitHub, 22 Nov 2026
Latest release
2.2.32GitHub, 22 Nov 2026
Released
20 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
PHPWikidata
First published on GitHub
2 Aug 2014GitHub

References