CVE-2024-1874
Php 8.1.0 – 8.1.28
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:LCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2024-1874 is a critical-severity Improper Encoding or Escaping of Output (CWE-116) vulnerability in Php Php. Its CVSS base score is 9.4 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Content Injection (T1659); ranked in the top 2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2024-1874 is a command-injection vulnerability in PHP's proc_open() function when invoked with array syntax on Windows. It affects PHP 8.1 before 8.1.28, 8.2 before 8.2.18, and 8.3 before 8.3.5, and stems from insufficient escaping of user-supplied arguments passed to the Windows command shell (CWE-116). The flaw carries a CVSS 3.1 score of 9.4.
An unauthenticated remote attacker who can influence the argument array supplied to proc_open() can inject additional shell commands, resulting in arbitrary command execution with the privileges of the PHP process. Successful exploitation grants the attacker the ability to read, modify, or delete data and, in many cases, to fully compromise the host.
Official advisories from the PHP project and downstream distributions such as Fedora direct users to upgrade immediately to the fixed releases (8.1.28, 8.2.18, or 8.3.5). The GitHub Security Advisory and oss-security postings contain the corresponding patches and back-port information.
The EPSS score for this CVE stands at 0.6857 with no material increase after disclosure.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-17599
Vulnerability Data
In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply…
more
arguments that would execute arbitrary commands in Windows shell.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V1.1.2V1.2.1V1.2.3
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Validating that output matches expected content directly mitigates failures to properly encode or escape data for its destination context.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly require proper output encoding to prevent injection and message malformation.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Secure coding standards explicitly require correct output encoding and escaping to preserve message structure.
Security testing can detect missing or incorrect encoding but does not itself implement the control.
Secure development life cycle mandates output encoding/escaping practices that directly prevent improper encoding.
Application security requirements include explicit rules for safe output handling and encoding.
Secure architecture principles reduce the likelihood of missing encoding but do not prescribe the actual technique.