CriticalCVE-2025-23209

    Potential RCE with a compromised security key in craft/cms (CVE-2025-23209)

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

    Share

    What is affected, what to do

    Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. This is an remote code execution (RCE) vulnerability that affects Craft 4 and 5 installs where your security key has already been compromised.

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

    Affected
    • CraftCMS CMS gte 4.0.0-RC1, < 4.13.8..*

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

    Metrics

    8.1

    Priority

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

    Source: NVD, CVSS v3

    8.1

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: OSV, CVE.org, pwn.watch

    21.6 %

    EPSS score

    Elevated — model estimates 10-50% exploitation likelihood.

    Source: FIRST EPSS, percentile 97.6

    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
    224.22 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
    8.1 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
    8.1
    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
    21.6 %
    Elevated — model estimates 10-50% exploitation likelihood.
    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
    97.6
    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 · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 21 February 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. Its high attack complexity comes solely from needing a known security key, and that bar is routinely cleared through exposed .env files, leaked repositories and copied backups. Exploitation likelihood is very high, and CISA added the CVE to KEV shortly after disclosure. Typical targets are internet-facing marketing and corporate sites, often run by agencies with uneven patch hygiene. CISA has not flagged ransomware use, but full code execution enables data theft, webshell persistence and lateral movement. Treat every internet-exposed Craft instance as top priority: patch and rotate the key, whether or not you have evidence that the key was compromised.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Patch now: Upgrade every Craft CMS install to Craft 5.5.8 or Craft 4.13.8 or later (composer update craftcms/cms, then php craft up). Affected ranges are Craft 4 from 4.0.0-RC1 below 4.13.8 and Craft 5 below 5.5.8. Confirm the installed version with composer show craftcms/cms.
      • Rotate the security key: Exploitation requires a compromised CRAFT_SECURITY_KEY. Generate a fresh key on each instance (php craft setup/security-key) and roll it out to every environment (.env, secrets store, CI/CD variables). Data encrypted with the old key, such as plugin settings, will need to be re-entered.
      • Scope key exposure: Search web-server logs for successful fetches of /.env, /.git/ and backup files. Check public and internal repos, container images, and DB and filesystem backups for plaintext keys. Treat any hit as a confirmed compromise.
      • Assume-breach triage: If the key may have leaked, treat the host as potentially compromised. Preserve the webroot, storage/ and logs for forensics, and hunt for new or modified PHP files (webshells). Rotate DB credentials, every API token in .env, and admin passwords.
      • Kill sessions: After rotating the key, terminate all active control-panel sessions and audit admin accounts for unknown users.
    2. Runbook step 2

      Mitigation layers

      • Web-server config: Point the document root strictly at web/. Explicitly deny dotfiles and sensitive paths, e.g. nginx location ~ /\.(env|git) { deny all; }. The project root with .env, config/ and storage/ must never be HTTP-reachable.
      • WAF/IPS: Block and alert on requests for /.env, /.git/config, *.sql, *.sql.gz and /storage/. Rate-limit and alert on requests to Craft action endpoints (/actions/ or ?action=) that carry unusually long signed or Base64-like parameters.
      • Endpoint hardening: Limit the PHP-FPM user's write access to storage/ and web/cpresources/. Set disable_functions = exec,shell_exec,system,passthru,proc_open,popen in php.ini where web-triggered backups are not needed. Deny PHP execution in upload and backup directories.
      • Feature reduction: Run DB backups from system cron or tooling rather than the control panel. Set allowAdminChanges to false in production and review any custom backupCommand setting for tampering.
      • Network segmentation: Egress-filter the CMS host to required destinations only (package mirrors, mail relay) to break reverse shells and payload staging. Restrict the control-panel path (/admin or your configured cpTrigger) by IP allowlist or VPN.
      • Secrets management: Keep CRAFT_SECURITY_KEY in a secrets store (Vault, Kubernetes secret) rather than in versioned files. Enforce pre-commit secret scanning (gitleaks, trufflehog) so .env never gets committed.
    3. Runbook step 3

      Detection rules

      • Process ancestry (EDR/auditd/Sysmon for Linux EID 1): Shells or network tools spawned by the web-server context. Sigma shape: ParentImage|endswith: ['/php-fpm','/php','/apache2','/httpd'] AND Image|endswith: ['/sh','/bash','/curl','/wget','/nc','/python3']. SPL: index=linux sourcetype=auditd type=EXECVE (ppid_exe="*php-fpm*" OR ppid_exe="*apache2*") (exe="/bin/sh" OR exe="/bin/bash" OR exe="*/curl" OR exe="*/wget").
      • Tampered backup invocations: mysqldump or pg_dump run with odd arguments, output paths outside storage/backups/, or appended shell metacharacters (;, |, $(, backticks). Source this from auditd execve arguments or EDR command lines.
      • File integrity (auditd -w /var/www/<project>/web -p wa, Wazuh/AIDE): New .php files in web/, web/cpresources/ or storage/, and changes to .env or config/ outside deployment windows.
      • Web access logs: HTTP 200 responses for /.env, /.git/ or *.sql* point to key leakage. Bursts of POSTs to /actions/ or index.php?p=admin/actions/ paths from unfamiliar IPs are also suspicious. KQL shape: W3CIISLog | where csUriStem has_any (".env",".git/config") and scStatus == 200.
      • Network telemetry (Zeek conn.log/Suricata): Outbound connections from the CMS host to unknown destinations or unusual ports, especially right after POSTs to action endpoints.

    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. This is an remote code execution (RCE) vulnerability that affects Craft 4 and 5 installs where your security key has already been compromised. Anyone running an unpatched version of Craft with a compromised security key is affected. This vulnerability has been patched in Craft 5.5.8 and 4.13.8. Users who cannot update to a patched version, should rotate their security keys and ensure their privacy to help migitgate the issue.

    Source: OSV (Open Source Vulnerabilities), cvelistv5, pwn.watch, NVD (NIST), 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
    • ≥ 4.0.0-RC1, < 4.13.8
    • —
    craftcmscraft_cms
    • 5.0.0
    • 4.0.0
    • 4.0.0 – < 4.13.8
    • 5.0.0 – < 5.5.8
    • —
    • —
    • 4.13.8
    • 5.5.8
    packagistcraftcms/cms
    • 4.13.2
    • 4.4.0-beta.2
    • 5.3.0.2
    • 4.7.2.1
    • 4.5.13
    • 4.0.5
    • 5.4.10
    • 4.4.11
    • 5.2.0
    • 4.0.0.1
    • 5.4.0.1
    • 4.11.3
    • 4.4.17
    • 4.3.8.2
    • 5.3.1
    • 4.10.2
    • 4.1.0.2
    • 5.4.7.1
    • 4.12.6
    • 5.3.3
    • 4.7.1
    • 4.3.5
    • 4.13.6
    • 5.4.7
    • 4.4.8
    • 4.10.5
    • 5.4.9
    • 5.2.3
    • 5.2.6
    • 5.5.3
    • 4.7.3
    • 4.8.1
    • 5.4.5.1
    • 4.8.10
    • 5.4.4
    • 5.4.3
    • 5.2.8
    • 5.1.8
    • 4.12.0
    • 4.0.1
    • 4.11.0.1
    • 5.5.1
    • 4.9.3
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    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

    References & sources

    • github.comcraftcms/cms/security/advisories/GHSA-x684-96hh-833xweb, x_refsource_CONFIRM, Vendor advisory, pwn-watch
    • NVD (NIST)NVD: CVE-2025-23209advisory, pwn-watch
    • github.comcraftcms/cms/commit/e59e22b30c9dd39e5e2c7fe02c147bcbd004e603web, x_refsource_MISC, Patch
    • craftcms.comknowledge-base/securing-craftweb, x_refsource_MISC, Product
    • github.comcraftcms/cmspackage
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2025-23209web, government-resource, US government resource
    • pwn.watchpwn.watch: Craft CMS: Code Injection Vulnerabilitypwn-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-2025-23209
    <a href="https://intel.neosec.eu/en/cve/CVE-2025-23209"><img src="https://intel.neosec.eu/badge/cve/CVE-2025-23209.svg?lang=en" alt="CVE-2025-23209 – NEOSEC Intel" height="20"></a>