CVE-2024-1874

Command injection via array-ish $command parameter of proc_open()

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.

Remediation

Workaround:

  • Using proc_open() string syntax avoids the problem.

Category

9.4
CVSS
Severity: Critical
CVSS 3.1 •
EPSS 43.94% Top 5%
Affected: PHP Group PHP
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-1874?
CVE-2024-1874 has been scored as a critical severity vulnerability.
How to fix CVE-2024-1874?
As a workaround for remediating CVE-2024-1874: Using proc_open() string syntax avoids the problem.
Is CVE-2024-1874 being actively exploited in the wild?
It is possible that CVE-2024-1874 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~44% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-1874?
CVE-2024-1874 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.