Impact
Grav before version 2.0.2 is vulnerable to a Twig sandbox bypass that functions like an injection flaw (CWE‑94). By calling grav.offsetGet('config'), a page author or any user with write access to the user/pages directory can obtain the real, unredacted configuration object. The sandbox‑approved dumps json_encode, print_r, or yaml_encode then serialize this object at the PHP level, exposing the full configuration tree, including SMTP credentials, API keys, and plugin database credentials. The vulnerability does not allow arbitrary code execution; it is a disclosure of protected data.
Affected Systems
All Grav versions earlier than 2.0.2 are affected. Updating to version 2.0.2 or later resolves the Twig sandbox bypass and eliminates the exposed configuration object.
Risk and Exploitability
The CVSS score of 7.1 indicates a high‑impact disclosure. The EPSS score of <1% suggests that exploitation is unlikely at present, and the vulnerability is not listed in CISA’s KEV catalog. Likely attack vectors involve a user with authoring privileges or directory‑write permissions creating a page that calls grav.offsetGet('config') and then applies json_encode, print_r, or yaml_encode. Successful exploitation would reveal all configuration secrets, limited to attackers who can write content to the user/pages directory.
OpenCVE Enrichment