CVE-2024-1874

Published Apr 29, 2024

Last updated a month ago

Overview

AI description

Automated description summarized from trusted sources.

CVE-2024-1874 is a command injection vulnerability affecting PHP versions 8.1.x before 8.1.28, 8.2.x before 8.2.18, and 8.3.x before 8.3.5. The vulnerability exists when using the `proc_open()` command with array syntax on Windows systems. Due to insufficient escaping, a malicious user who controls the arguments of the executed command can supply arguments that execute arbitrary commands in the Windows shell. This flaw is specific to Windows environments and involves the `CreateProcess` function implicitly using `cmd.exe` when executing batch files. The complex parsing rules of `cmd.exe` for unescaped arguments allow for command injection if an attacker can control part of the batch file's command arguments. This can lead to unauthorized access, data theft, or full control over the compromised system.

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.
Source
security@php.net
NVD status
Modified
Products
php, fedora

Risk scores

CVSS 3.1

Type
Secondary
Base score
9.4
Impact score
5.5
Exploitability score
3.9
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Severity
CRITICAL

Weaknesses

security@php.net
CWE-116

Social media

Hype score
Not currently trending

Configurations

References

Sources include official advisories and independent security research.