Skip to main content

Duplicate Advisory: Craft CMS: Authenticated leak of secret environment variables

0
High
Published: 08/11/2026 (08/11/2026, 15:32:39 UTC)
Source: GCVE Database
Product: craftcms/cms

Description

Craft CMS versions 4.0.0-RC1 before 4.18.2 and 5.0.0-RC1 before 5.10.6 contain a vulnerability where environment variables and secrets are interpolated into Twig templates even when sandboxing is enabled. An authenticated attacker with control panel access can exploit this to leak sensitive environment variables incrementally using a blind error-based technique. This can lead to session forgery, privilege escalation, and theft of credentials such as database, SMTP, API, or blob storage keys. The issue is fixed in versions 4.18.2 and 5.10.6.

CVSS v3.1

Score 6.5medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected software

Packagistghsa
craftcms/cms
Affected versions
>=4.0.0-RC1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 18:23:01 UTC

Technical Analysis

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

Potential Impact

An authenticated attacker with control panel access can incrementally leak sensitive environment variables and secrets, potentially allowing session forgery, privilege escalation, and theft of critical credentials such as database, SMTP, API, or blob storage keys. This compromises confidentiality but does not affect integrity or availability directly.

Mitigation Recommendations

This vulnerability is fixed in Craft CMS versions 4.18.2 and 5.10.6. Users should upgrade to these versions or later to remediate the issue. No other mitigations are indicated by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-cc2g-26rw-g997
Osv Schema Version
1.4.0
Ecosystems
["Packagist"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a9845c7acd9273b496affbd

Added to database: 09/02/2026, 15:50:31 UTC

Last enriched: 09/07/2026, 18:23:01 UTC

Last updated: 10/04/2026, 01:11:25 UTC

Views: 78

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses