Skip to main content

CVE-2026-115935: CWE-94 Improper Control of Generation of Code ('Code Injection') in craftcms cms

0
High
VulnerabilityCVE-2026-115935cvecve-2026-115935cwe-94
Published: 10/23/2026 (10/23/2026, 21:40:57 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: cms

Description

CVE-2026-115935 is a high-severity code injection vulnerability in CraftCMS that allows authenticated non-admin users with control panel access to inject a new security key into the .env file via crafted API response headers. This enables the attacker to forge signed login redirects containing Twig system() callbacks, potentially leading to remote code execution. The vulnerability affects CraftCMS versions 4.0.0 up to but not including 4.18.9, and 5.0.0 up to but not including 5.11.2.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

craftcms

cms

Affected versions
>=5.0.0 <5.11.2>=4.0.0 <4.18.9
Packagistmore threats →cve
craftcms/cms
pkg:composer/craftcms/cms
Affected versions
>=5.0.0 <5.11.2>=4.0.0 <4.18.9

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: 10/23/2026, 22:05:10 UTC

Technical Analysis

The vulnerability arises from the app/process-api-response-headers action in CraftCMS, which accepts fake API response headers from any authenticated control panel user. A non-admin user with accessCp permission can insert newline characters into the X-Craft-Plugin-Licenses header. CraftCMS passes this header value to its .env writer without sanitizing newlines, allowing the attacker to inject a new CRAFT_SECURITY_KEY into the .env file. Once the key is loaded, the attacker can forge signed login redirects containing Twig system() callbacks, enabling code injection. This issue is distinct from a previous report that involved reading the existing key via a Twig sandbox bypass; this one replaces the key via CRLF injection in API headers. Fixing one does not mitigate the other.

Potential Impact

An authenticated non-admin user with control panel access can inject a new security key into the .env file, enabling them to forge signed login redirects with arbitrary Twig system() callbacks. This can lead to remote code execution within the context of the CraftCMS application, posing a significant security risk.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict control panel access to trusted users only and monitor for unusual activity related to API response headers. Avoid granting accessCp permission to untrusted users. Follow vendor updates closely for an official fix.

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

Technical Details

Data Version
5.2
Assigner Short Name
Hackrate
Date Reserved
2026-10-23T21:23:18.607Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6adbd6bad73cc49347c37226

Added to database: 10/23/2026, 21:50:50 UTC

Last enriched: 10/23/2026, 22:05:10 UTC

Last updated: 10/23/2026, 22:06:00 UTC

Views: 5

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