llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · craftcms/cms

GHSA-596P-6JV8-775V

Craft CMS: Authenticated leak of secret environment variables

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versiones4.18.2 · 5.10.6
Exposición107 dDesde la divulgación, 6 ago 2026, 4:53 p. m.
Detección102 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 (media) 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.
Mi diagnóstico: un ticket y una sonrisa.Si tu inventario está al día, ya ganaste.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada
6 ago 26
1 sept 26
17 nov 26
22 nov 26
6 ago 26
2 sept 26
29 sept 26
26 oct 26
22 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-596P-6JV8-775V divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
GitHub

Environment variables and secrets are interpolated into a Twig template even when the Twig sandbox is enabled, allowing them to be leaked by an authenticated attacker.

The Craft vulnerability CVE-2026-31857 https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxc was only patched by applying sandboxed Twig templating. This theoretically protects Craft CMS against RCE attacks, provided the sandbox is enabled and secure, with no known bypasses.

However, the same request parameter `elementId,` which allows for sandboxed Twig templates to be rendered, also includes functionality that interpolates referenced environment variables. If the parameter includes a string of the form `${ENV_VAR}` then the string is replaced with the environment variable or secret from a secrets file with that name.

Afterward, the string is rendered as a Twig template. If the sandbox is disabled, Twig templates can already gain RCE or access environment variables using the getenv function. Sandboxed Twig templates should not have this access, but now do thanks to this additional environment-variable replacement behavior.

The template’s resulting value is not directly reflected in the response. To exfiltrate the value, the sandboxed Twig template cannot use network functions. But it can use a blind error-based approach similar to blind SQL injection. With enough requests, any environment variable or secret can be incrementally leaked. This can be abused to forge a session, escalate privileges with the `CRAFT_SECURITY_KEY`, and steal credentials for the database, SMTP server, or other connected APIs or blob storage.

Impact

An authenticated attacker, with permission to access the control panel, can render a malicious Twig template and steal arbitrary environment variables and secrets with a large number of requests, even if the Twig sandbox is enabled through `enableTwigSandbox()`.

Versiones

Rangos afectados

Afectada Corregida
craftcms/cms≥ 4.0.0-RC1 < 4.18.2
craftcms/cms≥ 5.0.0-RC1 < 5.10.6
4.0.0-RC1
4.18.2
5.0.0-RC1
5.10.6
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistcraftcms/cms
Corregida 4.18.2, 5.10.6 — —
Versiones corregidas4.18.25.10.6
Explotación

Arsenal público

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

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-72782
Otrahttps://github.com/craftcms/cms/security/advisories/GHSA-596p-6jv8-775v
Otrahttps://github.com/craftcms/cms
Otrahttps://github.com/craftcms/cms/releases/tag/4.18.2
Otrahttps://github.com/craftcms/cms/releases/tag/5.10.6
Otrahttps://www.vulncheck.com/advisories/craft-cms-rc1-before-environment-variable-leak

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