MediumGHSA-596p-6jv8-775v
Craft CMS: Authenticated leak of secret environment variables
Affected versions
5.0.0-RC1 to before 5.10.6, 4.0.0-RC1 to before 4.18.2 - fixed in 5.10.6Details
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 functionalit
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-72782
- https://github.com/craftcms/cms/security/advisories/GHSA-596p-6jv8-775v
- https://nvd.nist.gov/vuln/detail/CVE-2026-72782
- https://github.com/craftcms/cms
- https://github.com/craftcms/cms/releases/tag/4.18.2
- https://github.com/craftcms/cms/releases/tag/5.10.6
- https://www.vulncheck.com/advisories/craft-cms-rc1-before-environment-variable-leak
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected