CriticalCVE-2024-56145

    RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms (CVE-2024-56145)

    Published In CISA KEV since Sources: pwn.watch, CVE.org, OSV

    Share

    What is affected, what to do

    Craft CMS contains a code injection vulnerability that allows remote code execution if `register_argc_argv` is enabled in the php.ini configuration. This vulnerability is actively exploited, as indicated by its inclusion in the CISA KEV catalog. Affected versions range from 5.0.0-RC1 to 5.0.6. Users should update to versions 3.9.14, 4.13.2, or 5.5.2, or disable `register_argc_argv` to mitigate the risk.

    The vulnerability is being actively exploited; treat it as a priority. Update craft_cms to version 4.13.2. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • CraftCMS CMS gte 3.0.0, < 3.9.14..*

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    9.8

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: pwn.watch, CVE.org, OSV

    97.5 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.90

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    235.98 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploitedSource: VulnCheck KEV (opens in a new tab) How we classify
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.8
    CVSS v4

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.3
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    97.5 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.90
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 6 June 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-94

    Response and mitigation

    Why act now?

    Prioritisation rationale

    The flaw is network-reachable without authentication and, under the default-ish PHP configuration where register_argc_argv is enabled (common in many distribution builds), leads directly to remote code execution — full control of the CMS, its database and often adjacent backend systems. Exploitation likelihood ranks among the highest tracked by EPSS and the attack path is publicly understood at scale; CISA added it to KEV even without documented ransomware use. Treat any internet-exposed Craft installation as P1, especially corporate sites, customer portals and headless CMS backends that bridge to further APIs; internal instances without internet exposure are P2 but still due within the regular patch window.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Upgrade Craft CMS to a patched release: 3.9.14, 4.13.2 or 5.5.2 (composer require craftcms/cms:^5.5.2 on the matching branch, then php craft up).
      • If an immediate upgrade is not feasible, set register_argc_argv = Off in php.ini (or via PHP-FPM pool override) and restart PHP-FPM/Apache — this disables the known RCE vector as an interim control.
      • Place internet-facing Craft instances behind a WAF/reverse proxy or temporarily remove them from the public network until patch or php.ini hardening is in production.
      • After patching/hardening, rotate the security key (CRAFT_SECURITY_KEY), invalidate all active admin sessions, reissue API tokens and verify database credentials.
      • Pre-patch compromise assessment: inspect web/, storage/runtime/, templates/ and config/ for foreign PHP files, modified Twig templates and unexpected writable plugins; diff composer.lock against a known-good baseline.
    2. Runbook step 2

      Mitigation layers

      • Configuration: enforce register_argc_argv = Off across all PHP SAPIs (handle CLI separately if needed); verify with php -i | grep register_argc_argv.
      • Network segmentation: restrict the /admin path to defined management networks or a VPN/zero-trust proxy, enforced via IP allow-list at the reverse proxy.
      • WAF rule: block query strings and POST bodies containing suspicious PHP payload patterns (e.g. php://, data://, system(, passthru(, base64_decode() targeting Craft endpoints, plus requests carrying unusual argv/argc parameters against index.php.
      • Least privilege: run the PHP-FPM pool as a dedicated unix account with read-only access to vendor/, config/ and templates/; keep only storage/ and web/cpresources/ writable. Scope open_basedir to the Craft root and extend disable_functions with exec,passthru,shell_exec,system,proc_open,popen where Craft and plugins tolerate it.
      • Egress filtering: constrain outbound connections from the web host to required destinations (updates, mail, DB) to blunt reverse shells and second-stage downloads.
      • File integrity: enrol vendor/ and web/index.php in FIM (AIDE, Tripwire, Wazuh FIM).
    3. Runbook step 3

      Detection rules

      • Web access logs: requests to /index.php with unusually long query strings or URL-encoded PHP functions; Sigma shape: selection: cs-uri-stem endswith 'index.php' AND cs-uri-query contains any ('php://','data://','base64_decode','system(','passthru(').
      • Process telemetry (Sysmon EID 1 / auditd execve): PHP-FPM or Apache child spawning sh, bash, curl, wget, python, perl, nc — an ancestry of php-fpm -> sh -> curl is never expected on a clean Craft instance.
      • Filesystem: new or modified .php files under web/ or storage/runtime/compiled_templates/ outside the deployment window; auditd rule -w /var/www/craft/web -p wa -k craft_web_write.
      • Network (Zeek/Suricata): outbound connections from the web host to non-standard ports or newly resolved domains shortly after a POST to Craft endpoints; Suricata starter alert http any any -> any any (msg:"Possible Craft RCE callback"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"index.php";) as a correlation anchor.
      • Application logs: inspect storage/logs/web-*.log for Twig_Error, yii\base\ErrorException or unexpected admin logins from unknown IPs/user agents; KQL snippet: CraftLogs | where Message has_any ("Twig_Error","ErrorException") or SourceIp !in (knownAdminIps).

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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.

    Source: pwn.watch, NVD (NIST), OSV (Open Source Vulnerabilities), cvelistv5, CISA KEV Catalog, CVE.org (MITRE)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    craftcmscms
    • ≥ 3.0.0, < 3.9.14
    • —
    craftcmscraft_cms
    • 4.0.0 – < 4.13.2
    • 5.0.0 – < 5.5.2
    • 3.0.0 – < 3.9.14
    • 4.13.2
    • 5.5.2
    • 3.9.14
    packagistcraftcms/cms
    • 3.6.16
    • 3.5.19
    • 3.1.0-beta.7
    • 3.4.20
    • 3.3.4.1
    • 3.4.19
    • 3.0.22
    • 4.7.2.1
    • 5.4.10
    • 4.4.11
    • 3.8.6
    • 3.0.20
    • 5.2.0
    • 3.0.40
    • 5.4.0.1
    • 3.1.17.2
    • 4.4.17
    • 5.3.1
    • 4.10.2
    • 4.1.0.2
    • 5.4.7.1
    • 4.12.6
    • 5.3.3
    • 4.7.1
    • 3.6.7
    • 3.7.23
    • 5.4.7
    • 3.7.18.1
    • 3.2.0-RC1
    • 3.3.6
    • 4.10.5
    • 3.4.23
    • 3.6.14
    • 3.8.11
    • 3.0.16.1
    • 3.0.10.2
    • 5.2.3
    • 3.7.44
    • 5.2.6
    • 3.7.19.1
    • 3.4.4.1
    • 3.7.21
    • 4.7.3
    • 5.4.5.1
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-94Improper Control of Generation of Code ('Code Injection')

      Base

      The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

      Entry at MITRE CWE-94

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    GitHubChocapikk/CVE-2024-56145 (opens in a new tab)github.comPoC (publicly reported)reported, not verified—

    References & sources

    • github.comcraftcms/cms/security/advisories/GHSA-2p6p-9rc9-62j9web, x_refsource_CONFIRM, Vendor advisory, pwn-watch
    • NVD (NIST)NVD: CVE-2024-56145advisory, pwn-watch
    • github.comcraftcms/cms/commit/82e893fb794d30563da296bca31379c0df0079b3web, x_refsource_MISC, Patch
    • github.comChocapikk/CVE-2024-56145web, Exploit, Exploit
    • github.comcraftcms/cmspackage
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2024-56145web, government-resource, US government resource
    • pwn.watchpwn.watch: Craft CMS: 2 exploited vulnerabilities (CVE-2024-56145, CVE-2025-35939)pwn-watch
    • github.comCraft CMS advisory: Craft CMSpwn-watch
    • NVD (NIST)NVD: CVE-2025-35939pwn-watch
    • cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2024-56145
    <a href="https://intel.neosec.eu/en/cve/CVE-2024-56145"><img src="https://intel.neosec.eu/badge/cve/CVE-2024-56145.svg?lang=en" alt="CVE-2024-56145 – NEOSEC Intel" height="20"></a>