Cyber Resilience

CVE-2024-1874

Php 8.1.0 – 8.1.28

Public PoC
Published
29 April 2024
Modified
04 November 2025
Patch / advisory
CVSS Score v3.1 9.4
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
EPSS Score 0.33 98th percentile
Risk Priority 92 floored blend · peak EPSS

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, 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.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SI-2 (Flaw Remediation) — see the control section below for these in your framework.

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

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

Likely ATT&CK TechniquesAI

Techniques this vulnerability likely enables, inferred from its description, weakness type, and attributed-actor tradecraft. Confidence is per-technique.

T1059.003 Windows Command Shell Executionconfidence: HIGH
Command injection via proc_open() on Windows directly enables execution of arbitrary commands through the Windows Command Shell.
T1068 Exploitation for Privilege Escalation Privilege Escalationconfidence: HIGH
Arbitrary command execution with the privileges of the PHP process enables privilege escalation if that process runs with elevated rights.
T1203 Exploitation for Client Execution Executionconfidence: HIGH
Exploitation of the vulnerable proc_open() call constitutes client-side execution triggered by attacker-controlled input.
inferred from description + CWE · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2024-5585Same product: Fedoraproject Fedora
CVE-2024-2408Same product: Fedoraproject Fedora
CVE-2024-5458Same product: Fedoraproject Fedora
CVE-2023-3823Same product: Fedoraproject Fedora
CVE-2023-3824Same product: Fedoraproject Fedora
CVE-2024-4577Same product: Fedoraproject Fedora
CVE-2024-2757Same product: Php Php
CVE-2026-6722Same product: Php Php
CVE-2025-14177Same product: Php Php
CVE-2026-7259Same product: Php Php

Affected Assets

php
php
8.1.0 — 8.1.28 · 8.2.0 — 8.2.18 · 8.3.0 — 8.3.5
fedoraproject
fedora
39, 40

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-10 Information Input Validation
  • SI-2 Flaw Remediation
  • CM-7 Least Functionality
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.1.2
  • V1.2.1
  • V1.2.3

Mitigating Controls (NIST 800-53 r5) AI

prevent

Strict validation and sanitization of all arguments supplied to proc_open() would block the malicious command-injection payloads that exploit the insufficient escaping on Windows.

prevent

Rapid application of the PHP patches (8.1.28/8.2.18/8.3.5) directly removes the root-cause escaping flaw in proc_open().

prevent

Disabling or restricting the proc_open() function (via disable_functions or allow-listing only safe commands) eliminates the vulnerable code path an attacker could reach.

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.

PR.PS-06 mostly match
prevents

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.

prevents

Secure coding standards explicitly require correct output encoding and escaping to preserve message structure.

detects

Security testing can detect missing or incorrect encoding but does not itself implement the control.

prevents

Secure development life cycle mandates output encoding/escaping practices that directly prevent improper encoding.

prevents

Application security requirements include explicit rules for safe output handling and encoding.

prevents

Secure architecture principles reduce the likelihood of missing encoding but do not prescribe the actual technique.

References