Yiiframework Yii Improper Protection of Alternate Path Vulnerability (CVE-2024-58136)
Published In CISA KEV since Sources: pwn.watch, CVE.org, OSV
What is affected, what to do
The vulnerability CVE-2024-58136 in the Yii Framework allows for remote code execution (RCE) due to insufficient protection against alternate paths. An attacker can execute arbitrary code remotely, leading to full control over the affected system. This vulnerability is actively exploited in the wild, as confirmed by its listing in the CISA KEV catalog. Affected are all Yii 2 versions before 2.0.52 and products implementing Yii, such as Craft CMS. An immediate upgrade to version 2.0.52 or higher is urgently required to mitigate this vulnerability.
The vulnerability is being actively exploited; treat it as a priority. Update Yii to version 2.0.52. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- Yii
lt 2..2.0.52
- Yii
- Fixed in
- Yii
2.0.52
- Yii
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.0
CVSS v3
Severity Critical on the scale from 0 to 10.
Source: pwn.watch, CVE.org, OSV
87.8 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.76
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- 233.05 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.0
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- 87.8 %
- 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.76
- 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 2 May 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-424
Response and mitigation
Why act now?
Prioritisation rationale
This CVE sits on KEV because it is network-reachable without authentication, grants remote code execution, and was actively exploited against Craft CMS and other Yii-based applications between February and April 2025 — it is a regression of the previously known CVE-2024-4990. Exploitation likelihood is among the very highest tracked by EPSS and working exploits are public. For NIS2-regulated organisations running internet-facing PHP applications (CMS portals, customer portals, APIs) this is a P1 patch; internal-only Yii apps behind authentication can be scheduled as P2 but should still be included in the same patch cycle, because an attacker already on the perimeter will reuse the same primitive for lateral movement.
Runbook step 1
Immediate response (0-24 h)
- Upgrade yiisoft/yii2 to 2.0.52 or later via
composer require yiisoft/yii2:^2.0.52followed bycomposer update. Explicitly re-check deployments that lack a committedcomposer.lock. - Patch Craft CMS instances to a release that fixes CVE-2025-32432 (Craft 3.9.15, 4.14.15, 5.6.17 or newer) — image-transform endpoints are the known attack surface.
- Inventory all PHP applications:
grep -r "yiisoft/yii2" /var/www --include=composer.lock, plus a code review forYii::createObjectcalled with user-controllable config arrays in legacy code. - Place exposed Yii apps (admin, debug and image-transform endpoints in particular) behind authentication or VPN until the patch rollout is confirmed.
- Run a compromise assessment for February-April 2025 and onwards: webshells under
web/,assets/,runtime/, unexpected.phpfiles with mtime after deployment, suspicious cron jobs,www-datashell history. - Rotate database and application credentials if any compromise indicator is found or if the application was internet-facing.
- Upgrade yiisoft/yii2 to 2.0.52 or later via
Runbook step 2
Mitigation layers
- WAF rule: block HTTP requests whose JSON or form parameters contain a
__classorclasskey inside nested arrays (regex example:(\"|%22)__class(\"|%22)\s*:). Apply particularly to POST bodies against image-transform and API endpoints. - Network segmentation: deny egress from PHP-FPM/web servers to arbitrary destinations — allowlist only backend services (DB, cache, SMTP). This defeats reverse shells and second-stage downloads.
- Filesystem hardening: mount
web/,assets/and upload directoriesnoexec, or exclude them from PHP execution in the web server config (<FilesMatch>on Apache, nginxlocationwithoutfastcgi_pass). - PHP hardening:
disable_functions = exec,passthru,shell_exec,system,proc_open,popeninphp.ini, restrictopen_basedirto the application directory, setexpose_php = Off. - Least privilege: the web server account (
www-data) must not have write access to code directories; onlyruntime/andassets/writable. Prefer immutable container images for deployment. - Disable Yii debug module (
yii\debug\Module) and the Gii code generator in production, or restrict them to an IP allowlist.
- WAF rule: block HTTP requests whose JSON or form parameters contain a
Runbook step 3
Detection rules
- Web access logs: search for
__classin request bodies or query strings. Splunk:index=web sourcetype=access_combined "__class"— false-positive rate is low, triage any hit immediately. - Sysmon EID 1 / auditd
execve: PHP-FPM or Apache process spawningsh,bash,curl,wget,python,perl, ornc. Sigma shape:ParentImage endswith 'php-fpm'ANDImage in ('/bin/sh','/bin/bash','/usr/bin/curl'). - File integrity: FIM alert (auditd
-w /var/www -p wa) on new.phpfiles outside the deployment window, especially underweb/assets/andruntime/. - Network telemetry (Zeek/Suricata): outbound connections from the web server segment to non-allowlisted destinations, in particular ports 4444, 1337, 8080 or paste-site / raw-GitHub domains.
- Application log: Yii exceptions mentioning
Unknown propertyorcreateObjectcorrelated with unauthenticated requests — a strong signal of probing against the__classbehavior vector.
- Web access logs: search for
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
Yii 2 before 2.0.52 mishandles the attaching of behavior that is defined by an __class array key, a CVE-2024-4990 regression, as exploited in the wild in February through April 2025.
Source: pwn.watch, NVD (NIST), OSV (Open Source Vulnerabilities), CISA KEV Catalog, CVE.org (MITRE), cvelistv5
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| yiiframework | Yii |
|
|
| yiiframework | yii |
|
|
| packagist | yiisoft/yii2 |
|
|
Vendors and products
Weakness classes (CWE)
CWE-424Improper Protection of Alternate Path
Class
The product does not sufficiently protect all possible paths that a user can take to access restricted functionality or resources.
Entry at MITRE CWE-424
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.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited |
References & sources
- NVD (NIST)NVD: CVE-2024-58136advisory, pwn-watch
- github.comyiisoft/yii2/pull/20232web, Patch
- github.comyiisoft/yii2/pull/20232web, Issue tracking
- github.comyiisoft/yii2/commit/40fe496eda529fd1d933b56a1022ec32d3cd0b12web, Patch
- github.comyiisoft/yii2package
- github.comyiisoft/yii2/compare/2.0.51...2.0.52web, Issue tracking
- sensepost.comblog/2025/investigating-an-in-the-wild-campaign-using-rce-in-cr…web
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2024-58136web, government-resource, US government resource
- yiiframework.comYiiframework advisory: Yiiframework Yiiweb, Vendor advisory, pwn-watch
- sensepost.comblog/2025/investigating-an-in-the-wild-campaign-using-rce-in-cr…Technical description, Exploit, Third-party advisory
- pwn.watchpwn.watch: Yiiframework Yii: Yii Improper Protection of Alternate Path 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.
<a href="https://intel.neosec.eu/en/cve/CVE-2024-58136"><img src="https://intel.neosec.eu/badge/cve/CVE-2024-58136.svg?lang=en" alt="CVE-2024-58136 – NEOSEC Intel" height="20"></a>