CVE-2026-72782

Medium

Description

Craft CMS versions >= 5.0.0-RC1 before 5.10.6 and >= 4.0.0-RC1 before 4.18.2 interpolate environment variables and secrets (via ${ENV_VAR} strings in the elementId parameter) into Twig templates before rendering, even when the Twig sandbox is enabled. An authenticated attacker with control panel access can render a malicious sandboxed Twig template and, using a blind error-based technique across many requests, incrementally leak arbitrary environment variables and secrets. These can be abused to forge sessions (via CRAFT_SECURITY_KEY), escalate privileges, and steal database, SMTP, API, or blob storage credentials. Fixed in 5.10.6 and 4.18.2.

SeverityMedium
CVSS6.5
Exploit probability—
ProductCraftcms/cms
PublishedAug 11, 2026
First seenAug 11, 2026
Weakness typeCWE-668CWE-668

How to fix

Update
  • craftcms/cms5.10.6, 4.18.2 or later

Affected products

ProductAffected versionsFixed in
craftcms/cmsPackagist5.0.0-RC1 ≤ v < 5.10.6, 4.0.0-RC1 ≤ v < 4.18.25.10.6, 4.18.2

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.