CVE-2024-1874 Command injection via array-ish $command parameter of proc_open()
Attackers can execute arbitrary commands on Windows systems via proc_open() if they control command arguments, requiring PHP upgrades.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-1874?
CVE-2024-1874 is a critical command injection vulnerability in Fedoraproject Fedora, published on 29 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-116
Which versions are affected by CVE-2024-1874?
3 open source packages ship an affected version, including libphp, php and php-min. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
libphp Bitnami | All versions | 8.1.28, 8.2.18, 8.3.5 |
php Bitnami | All versions | 8.1.28, 8.2.18, 8.3.5 |
php-min Bitnami | All versions | 8.1.28, 8.2.18, 8.3.5 |
Products include Fedoraproject Fedora, Php Php.
How do I fix CVE-2024-1874?
Upgrade libphp to a fixed version for your release line: 8.1.28, 8.2.18 or 8.3.5.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-1874 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1874 exists.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as AZL-40052, BELL-CVE-2024-1874, BIT-libphp-2024-1874, BIT-php-2024-1874, BIT-php-min-2024-1874, CLEANSTART-2026-GO78577 and 1 more.