llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · getgrav/grav

GHSA-QRP6-34RP-Q6MR

Publishers can read account and configuration files through YAML parsing in Twig content

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.2.18
Exposición21 dDesde la divulgación, 31 oct 2026, 4:05 p. m.
Detección18 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
No corre prisa, pero no la pierdas de vista.Tu yo del futuro te agradecerá revisarla hoy.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
31 oct 26
18 nov 26
21 nov 26
31 oct 26
6 nov 26
11 nov 26
16 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-QRP6-34RP-Q6MR divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

A page editor (publisher) can read account and configuration files by passing a crafted one-line string to Twig's `yaml_decode` in page content. Grav's YAML compatibility fallback treats a one-line string as a file name when such a file exists, opens it as a stream path, and prints its content, so `account://admin.yaml` (password hash, reset token) and other YAML configuration reach anonymous visitors.

Affected versions

Grav 2.x from 2.0.0 up to and including 2.2.17. The compatibility fallback has been reachable from `yaml_decode` since Grav 1.5.1, and it became a sandbox escape when the Twig sandbox arrived in 2.0.0-beta.2. Grav 1.7 has the same fallback, but exploiting it there needs a publisher account or a site-built form with a `yaml: true` field, so no 1.7 release is part of this advisory.

Details

When the Symfony YAML parser throws, `YamlFormatter` falls back to the toolbox's `Compat\Yaml\Yaml::parse()`. That static method treats a one-line string as a file name when `is_file()` succeeds. Grav forces the compatibility mode on regardless of `system.strict_mode.yaml_compat`. A value such as `account://x/y: @z/../../admin.yaml` makes Symfony throw (because of the `@`), and the stream normalizer then folds the `..` textually, so the fallback opens `account://admin.yaml`. `yaml_decode` is on the sandbox allowlist, so page content can call it. The reproducer shows a visitor receiving the exact admin hash in the rendered page.

The same fallback is reachable through form fields with `yaml: true` validation (anonymous, but only on a site that built such a form and echoes the value), one-line page frontmatter decoded by the toolbox's `MarkdownFile`, the Flex `frontmatter()` formatter, and the YAML linter in strict mode.

Impact

A publisher reads any YAML file in a resolvable stream, which includes account files and saved plugin configuration. The password hash and reset token let the publisher take over accounts. The attacker needs page edit rights.

Patches

Fixed in Grav 2.2.18. Core's YAML formatter and YAML linter call the compatibility parser directly instead of the static `Compat\Yaml\Yaml::parse()` that guesses file names, so a one-line string is always read as YAML text, and one-line page frontmatter is passed to the toolbox decoder with a blank line after it so it is also read as text. A change inside the `rockettheme/toolbox` library itself (its `MarkdownFile` and `YamlFile` classes) is not part of this release.

Credits

Discovered by Anthropic's OSS Scanner (ANT-2026-Z8GAVL6B).

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
getgrav/grav≥ 2.0.0 < 2.2.18
2.0.0
2.2.18
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav
Corregida 2.2.18 — —
Versiones corregidas2.2.18
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/getgrav/grav/security/advisories/GHSA-qrp6-34rp-q6mr

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.