{"answers":{"affected":"6 open source packages ship an affected version, including craftcms/cms. It affects 1 product.","exploited":"Yes. Attackers have exploited CVE-2024-56145 in the wild since at least 2 Jun 2025.","fix":"Upgrade craftcms/cms to a fixed version for your release line: 3.9.14, 4.13.2 or 5.5.2. US federal agencies must fix it by 23 Jun 2025.","what":"CVE-2024-56145 is a critical code injection vulnerability in Craftcms Craft Cms, published on 18 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-56145 and fix it if it is affected.\n\nWhat it is: CVE-2024-56145 is a critical code injection vulnerability in Craftcms Craft Cms, published on 18 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2024-56145 in the wild since at least 2 Jun 2025.\n\nAffected packages and fixed versions:\n- craftcms/cms (Packagist): affected from 3.0.0; fixed in 3.9.14\n- craftcms/cms (Packagist): affected from 3.0.0; fixed in 3.9.14\n- craftcms/cms (Packagist): affected from 4.0.0-RC1; fixed in 4.13.2\n- craftcms/cms (Packagist): affected from 4.0.0-RC1; fixed in 4.13.2\n- craftcms/cms (Packagist): affected from 5.0.0-RC1; fixed in 5.5.2\n- craftcms/cms (Packagist): affected from 5.0.0-RC1; fixed in 5.5.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-56145/ (Markdown: https://insights.sbomify.com/CVE-2024-56145/index.md)","id":"CVE-2024-56145","markdown":"https://insights.sbomify.com/CVE-2024-56145/index.md","name":"CVE-2024-56145","record":{"aliases":["GHSA-2p6p-9rc9-62j9"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Craft CMS","requires_auth":"none","summary":"Remote code execution is possible in Craft CMS when the PHP register_argc_argv setting is enabled, requiring an upgrade or configuration change.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"craft_cms","vendor":"craftcms"}],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":"2024-12-19","github_poc":3,"max_poc_stars":48,"metasploit":1,"nuclei":1,"refs":[{"date":"2024-12-20T03:34:01Z","kind":"github_poc","ref":"https://github.com/Chocapikk/CVE-2024-56145","stars":48,"title":"Unauthenticated RCE on CraftCMS when PHP `register_argc_argv` config setting is enabled"},{"date":"2024-12-22T11:53:04Z","kind":"github_poc","ref":"https://github.com/Sachinart/CVE-2024-56145-craftcms-rce","stars":4,"title":"CVE-2024-56145 SSTI to RCE - twig templates "},{"date":"2024-12-19","kind":"metasploit","ref":"exploit/linux/http/craftcms_ftp_template","stars":null,"title":"Craft CMS Twig Template Injection RCE via FTP Templates Path"},{"date":"2025-04-06T10:16:20Z","kind":"github_poc","ref":"https://github.com/hmhlol/craft-cms-RCE-CVE-2024-56145","stars":0,"title":"A POC lab environment for CVE-2024-56145 CraftCMS RCE."},{"date":null,"kind":"nuclei","ref":"http/cves/2024/CVE-2024-56145.yaml","stars":null,"title":"Craft CMS - Remote Code Execution via Template Path Manipulation"}],"tier":"exploited"},"has_fix":true,"headline":"Craft CMS Code Injection","id":"CVE-2024-56145","indexable":true,"kev":{"dateAdded":"2025-06-02","dueDate":"2025-06-23","knownRansomwareCampaignUse":"Unknown","product":"Craft CMS","requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","vendorProject":"Craft CMS","vulnerabilityName":"Craft CMS Code Injection Vulnerability"},"kind":"cve","links":{"ecosystem":"Packagist","product":"craftcms:craft_cms","products":["craftcms:craft_cms"],"type":"code_injection","year":"2024"},"n_packages":6,"n_references":2,"next":{"headline":"Halo Vulnerable to Stored XSS and RCE via File Upload Bypass","id":"CVE-2024-56156"},"packages":[{"ecosystem":"Packagist","fixed":["3.9.14"],"introduced":["3.0.0"],"last_affected":[],"package":"craftcms/cms","purl":null,"source":"GHSA-2p6p-9rc9-62j9"},{"ecosystem":"Packagist","fixed":["3.9.14"],"introduced":["3.0.0"],"last_affected":[],"package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"GHSA-2p6p-9rc9-62j9"},{"ecosystem":"Packagist","fixed":["4.13.2"],"introduced":["4.0.0-RC1"],"last_affected":[],"package":"craftcms/cms","purl":null,"source":"GHSA-2p6p-9rc9-62j9"},{"ecosystem":"Packagist","fixed":["4.13.2"],"introduced":["4.0.0-RC1"],"last_affected":[],"package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"GHSA-2p6p-9rc9-62j9"},{"ecosystem":"Packagist","fixed":["5.5.2"],"introduced":["5.0.0-RC1"],"last_affected":[],"package":"craftcms/cms","purl":null,"source":"GHSA-2p6p-9rc9-62j9"},{"ecosystem":"Packagist","fixed":["5.5.2"],"introduced":["5.0.0-RC1"],"last_affected":[],"package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"GHSA-2p6p-9rc9-62j9"}],"prev":{"headline":"Stored XSS-LibreNMS-Display Name 2 in librenms","id":"CVE-2024-56144"},"products":["cms"],"published":"2024-12-18","related":[{"cvss_score":10,"headline":"Craft CMS Code Injection","id":"CVE-2025-32432","kev_date_added":"2026-03-20","published":"2025-04-25"},{"cvss_score":8.1,"headline":"Craft CMS Code Injection","id":"CVE-2025-23209","kev_date_added":"2025-02-20","published":"2025-01-18"},{"cvss_score":6.9,"headline":"Craft CMS External Control of Assumed-Immutable Web Parameter","id":"CVE-2025-35939","kev_date_added":"2025-06-02","published":"2025-05-07"},{"cvss_score":10,"headline":"Craft CMS Remote Code Execution vulnerability","id":"CVE-2023-41892","kev_date_added":null,"published":"2023-09-13"},{"cvss_score":9.8,"headline":"Craft CMS Remote Code Injection","id":"CVE-2021-27903","kev_date_added":null,"published":"2021-06-30"},{"cvss_score":9.8,"headline":"SEOmatic for CraftCMS allows Server-Side Template Injection","id":"CVE-2020-9757","kev_date_added":null,"published":"2020-03-04"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["craftcms"]},"summary":"Remote code execution is possible in Craft CMS when the PHP register_argc_argv setting is enabled, requiring an upgrade or configuration change.","url":"https://insights.sbomify.com/CVE-2024-56145/"}