CVE-2024-56145 — cms
Fix: craftcms/cms@82e893fCVE-2024-56145 is a Code Injection vulnerability in craftcms/cms. It is in CISA's Known Exploited Vulnerabilities catalog (added 2025-06-02) — treat it as actively exploited and patch now. A fix is available for craftcms/cms — see the affected versions and patch details below.
RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2025-06-02. Federal agencies were required to remediate by 2025-06-23.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2024-56145.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
craftcms/cms🐘craftcms/cms🐘craftcms/cmsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has register_argc_argv enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable register_argc_argv to mitigate the issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | craftcms/cms | ≥ 5.0.0-RC1&&< 5.5.2 | 5.5.2composer require craftcms/cms:^5.5.2 |
| 🐘Packagist | craftcms/cms | ≥ 4.0.0-RC1&&< 4.13.2 | 4.13.2composer require craftcms/cms:^4.13.2 |
| 🐘Packagist | craftcms/cms | ≥ 3.0.0&&< 3.9.14 | 3.9.14composer require craftcms/cms:^3.9.14 |
Affected Products
craft cmscraftcmsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for craftcms/cms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update craftcms/cms to 5.5.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-56145 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2024-56145
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-56145 -u https://target- Template
- Craft CMS - Remote Code Execution via Template Path Manipulation
- Severity
- critical
- Impact
- Successful exploitation of this vulnerability could allow an unauthenticated attacker to perform remote code execution.
- Remediation
- Upgrade CraftCMS to either >5.5.2 or >4.13.2 or >3.9.14. Or If you can't upgrade yet, and register_argc_argv is enabled, you can disable it to mitigate the issue.
Template by ProjectDiscovery nuclei-templates (jackhax), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2024-56145 in your dependencies?
Find it across Packagist, including transitive dependencies.