Grav 2.0.0-rc.1 through 2.0.21 Configuration Disclosure via print_r
Grav is a flat-file CMS. In versions 2.0.0-rc.1 through 2.0.21, the Twig content sandbox fails to restrict the dump and serialize filters (print_r, vardump, json_encode, yaml_encode, string): GravExtension::assertSandboxDumpSafe() determines sandbox state by calling SandboxExtension::isSandboxed() without a Source argument, which reports only the global sandbox flag that Grav never enables, so the guard added in GHSA-mc5q-6hpj-rp7j never executes. As a result, an authenticated user with page-edit rights can render {{ config|print_r }} in page content with Twig processing enabled and dump Grav's entire merged configuration — print_r reflects the real Config object held in a private property of the SandboxConfig facade, bypassing its path redaction — exposing plugin secrets such as SMTP credentials, API tokens, webhook secrets and cache backend passwords. Grav 1.7 is not affected because it ships no Twig content sandbox. The issue is fixed in 2.0.22, where the affected filters are registered with Twig's needs_is_sandboxed flag.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-92917
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 06:04 UTC · Revision 1
Source evidence
Grav 2.0.0-rc.1 through 2.0.21 Configuration Disclosure via print_r
core-osv · Original sourcePublished 17 Sept 2026, 11:16 UTC
Grav is a flat-file CMS. In versions 2.0.0-rc.1 through 2.0.21, the Twig content sandbox fails to restrict the dump and serialize filters (print_r, vardump, json_encode, yaml_encode, string): GravExtension::assertSandboxDumpSafe() determines sandbox state by calling SandboxExtension::isSandboxed() without a Source argument, which reports only the global sandbox flag that Grav never enables, so the guard added in GHSA-mc5q-6hpj-rp7j never executes. As a result, an authenticated user with page-edit rights can render {{ config|print_r }} in page content with Twig processing enabled and dump Grav's entire merged configuration — print_r reflects the real Config object held in a private property of the SandboxConfig facade, bypassing its path redaction — exposing plugin secrets such as SMTP credentials, API tokens, webhook secrets and cache backend passwords. Grav 1.7 is not affected because it ships no Twig content sandbox. The issue is fixed in 2.0.22, where the affected filters are registered with Twig's needs_is_sandboxed flag.
osv:CVE-2026-92917
Complete source record
{
"id": "a7893df9ae6c6554c8ac6f67d82f3e92c4fd6faf24e10f38125ea8b14d8d85cd",
"url": "https://osv.dev/vulnerability/CVE-2026-92917",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Grav 2.0.0-rc.1 through 2.0.21 Configuration Disclosure via print_r",
"summary": "Grav is a flat-file CMS. In versions 2.0.0-rc.1 through 2.0.21, the Twig content sandbox fails to restrict the dump and serialize filters (print_r, vardump, json_encode, yaml_encode, string): GravExtension::assertSandboxDumpSafe() determines sandbox state by calling SandboxExtension::isSandboxed() without a Source argument, which reports only the global sandbox flag that Grav never enables, so the guard added in GHSA-mc5q-6hpj-rp7j never executes. As a result, an authenticated user with page-edit rights can render {{ config|print_r }} in page content with Twig processing enabled and dump Grav's entire merged configuration — print_r reflects the real Config object held in a private property of the SandboxConfig facade, bypassing its path redaction — exposing plugin secrets such as SMTP credentials, API tokens, webhook secrets and cache backend passwords. Grav 1.7 is not affected because it ships no Twig content sandbox. The issue is fixed in 2.0.22, where the affected filters are registered with Twig's needs_is_sandboxed flag.",
"evidence": "osv:CVE-2026-92917",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-92917",
"aliases": [
"CVE-2026-92917",
"GHSA-rfr9-7h4p-gx2x"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/getgrav/grav",
"type": "GIT",
"events": [
{
"introduced": "1f83c8bccc0be87e49ab9858ed772261b350fc2c"
},
{
"fixed": "bc216085962fb14054b0a8ad4a4e56906994fc4b"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "2.0.0-rc.1"
},
{
"fixed": "2.0.22"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-92917.json"
}
}
],
"modified": "2026-10-28T02:30:43.168620611Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/92xxx/CVE-2026-92917.json",
"https://github.com/getgrav/grav/security/advisories/GHSA-rfr9-7h4p-gx2x",
"https://nvd.nist.gov/vuln/detail/CVE-2026-92917",
"https://www.vulncheck.com/advisories/grav-2.0.0-rc.1-through-2.0.21-configuration-disclosure-via-print-r"
],
"provider_metadata": {
"cwe_ids": [
"CWE-200"
],
"cna_assigner": "VulnCheck",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/92xxx/CVE-2026-92917.json"
}
},
"related_cves": [
{
"value": "CVE-2026-92917",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510945,
"published_at": "2026-09-17T11:16:45.044+00:00"
}