CVE-2024-1874

CRITICAL

PHP <8.1.28, 8.2.*<8.2.18, 8.3.*<8.3.5 - Command Injection

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2024-1874. PoCs published by Tgcohce.

AI-analyzed exploit summary The repository contains functional exploit code demonstrating CVE-2024-1874, a command injection vulnerability in PHP's proc_open() function. It includes PoCs in both PHP and Python that bypass the original fix by leveraging trailing spaces in command names.

Description

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 arguments that would execute arbitrary commands in Windows shell.

Exploits (1)

nomisec WORKING POC 2 stars
by Tgcohce · poc
https://github.com/Tgcohce/CVE-2024-1874

The repository contains functional exploit code demonstrating CVE-2024-1874, a command injection vulnerability in PHP's proc_open() function. It includes PoCs in both PHP and Python that bypass the original fix by leveraging trailing spaces in command names.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8
No auth needed
Prerequisites: Target running vulnerable PHP version · Ability to supply malicious arguments to proc_open()
devstral-2 · analyzed Feb 19, 2026 Full analysis →

Scores

CVSS v3 9.4
EPSS 0.3257
EPSS Percentile 98.1%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

CISA SSVC

Vulnrichment
Exploitation poc
Automatable yes
Technical Impact total

Details

CWE
CWE-116
Status published
Products (3)
fedoraproject/fedora 39
fedoraproject/fedora 40
php/php 8.1.0 - 8.1.28
Published Apr 29, 2024
Tracked Since Feb 18, 2026