Code Injection in Craft CMS - CVE-2025-46731

 

Code Injection in Craft CMS - CVE-2025-46731

Published: May 5, 2025 / Updated: May 9, 2025


Vulnerability identifier: #VU108656
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Clear
CVE-ID: CVE-2025-46731
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: Public exploit is available
Vendor: Pixel & Tonic, Inc.
Affected software:
Craft CMS

Detailed vulnerability description

The vulnerability allows a remote user to execute arbitrary code on the target system.

The vulnerability exists due to improper input validation when handling Twig templates. A remote privileged user can and execute arbitrary PHP code on the target system.

Note, successful exploitation of the vulnerability requires that ALLOW_ADMIN_CHANGES is enabled.


How to mitigate CVE-2025-46731

Install updates from vendor's website.

Sources