Skip to main content

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

0
High
VulnerabilityCVE-2026-112772cvecve-2026-112772
Published: 10/19/2026 (10/19/2026, 19:10:51 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: cms

Description

Craft CMS versions 5.0.0 through before 5.11.0 contain a remote code execution vulnerability that allows authenticated Control Panel users to bypass the Twig sandbox via Asset::getMimeType transforms. This occurs because unfiltered 'as' or 'on' keys are passed to Craft::createObject, enabling malicious behaviors or event handlers to execute code as the web user.

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.0
GitHub Actionsmore threats →ai
craftcms/cms
pkg:github/craftcms/cms

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/19/2026, 19:48:44 UTC

Technical Analysis

CVE-2026-112772 is a remote code execution vulnerability in Craft CMS affecting versions 5.0.0 up to but not including 5.11.0. Authenticated users with Control Panel access can exploit this flaw by supplying specially crafted 'as' or 'on' keys to the Asset::getMimeType transforms, which are passed without filtering to the Craft::createObject method. This allows attackers to attach malicious behaviors or event handlers that execute arbitrary code within the context of the web user, effectively escaping the Twig sandbox intended to restrict code execution.

Potential Impact

Successful exploitation allows authenticated Control Panel users to execute arbitrary code on the server with the privileges of the web user. This can lead to full compromise of the application environment, data exposure, or further attacks within the hosting infrastructure. The vulnerability requires authentication but no user interaction beyond that, and has a high severity score of 8.7.

Mitigation Recommendations

No explicit patch or remediation details are provided in the input data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict Control Panel user access to trusted personnel only and monitor for suspicious activity related to Asset::getMimeType usage.

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
VulnCheck
Date Reserved
2026-10-19T18:10:49.940Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ad670ea2cdf04f65685174d

Added to database: 10/19/2026, 19:35:06 UTC

Last enriched: 10/19/2026, 19:48:44 UTC

Last updated: 10/19/2026, 19:48:44 UTC

Views: 4

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