CVE-2026-72782: Craft CMS · Authenticated leak of secret environment variables
Affects craftcms/cmsSource GCVE Database
Mentioned vulnerabilities
CVSS 5.1 Medium : upgrade to 5.10.6 when convenient.
Data as of 13 Sep 2026, 15:02 UTC
- Patch
- Available – fixed in 5.10.6, 4.18.2
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NWhat to do
Upgrade craftcms/cms to 5.10.6; craftcms/cms to 4.18.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistcraftcms/cms | Affected
| Fixed in
|
| Packagistcraftcms/cms | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available for this vulnerability. Users should upgrade to Craft CMS versions 4.18.2 or later and 5.10.6 or later where this issue is fixed. Applying the official patch eliminates the environment variable interpolation flaw and restores the intended security of the Twig sandbox. No additional mitigations are required if the patch is applied.
Description
Craft CMS versions 4.0.0-RC1 through before 4.18.2 and 5.0.0-RC1 through before 5.10.6 contain a vulnerability where authenticated users with control panel access can leak secret environment variables. This occurs because environment variables are interpolated into Twig templates even when the Twig sandbox is enabled, allowing secrets to be extracted via blind error-based techniques. The vulnerability enables attackers to incrementally exfiltrate sensitive secrets such as the CRAFT_SECURITY_KEY, database credentials, and API keys, potentially leading to session forgery and privilege escalation.
References
- github.com/craftcms/cms/security/advisories/GHSA-596p-6jv8-775v (opens in a new tab)
- github.com/craftcms/cms (opens in a new tab)
- github.com/craftcms/cms/releases/tag/4.18.2 (opens in a new tab)
- github.com/craftcms/cms/releases/tag/5.10.6 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-72782 (opens in a new tab)
- vulncheck.com/advisories/craft-cms-rc1-before-environment-variable-leak (opens in a new tab)