Skip to main content
Public proof of conceptFix available

CVE-2024-1874

A public proof of concept exists; no exploitation attested.

  • Published2024-04-29
  • Fixed in8.3.5 · 8.2.18 · 8.1.28
  • WeaknessCWE-116

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-04-2904:15CVE publishedNVD

Versions per branch

NVD · OSV · CISA-ADP
PHP
BranchAffectedFixed in
8.3≥ 8.3.0, < 8.3.58.3.5
8.2≥ 8.2.0, < 8.2.188.2.18
8.1≥ 8.1.0, < 8.1.288.1.28
8.1< 8.1.288.1.28
Php group php
BranchAffectedFixed in
8.1= 8.1.0no fix published
8.2= 8.2.0no fix published
8.3= 8.3.0no fix published
Fedoraproject fedora
BranchAffectedFixed in
39.x= 39no fix published
40.x= 40no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHPother versions: affected

    platforms: Windows

    Affected
    • ≥ 8.1.*, < 8.1.28fixed in 8.1.28semver
    • ≥ 8.2.*, < 8.2.18fixed in 8.2.18semver
    • ≥ 8.3.*, < 8.3.5fixed in 8.3.5semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-06-13

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • phpMageia:9all versions · fixed in 8.2.18-1.mga9
  • phpCleanStartall versions · fixed in 8.3.5-r0and 3 other packages
  • phpAzure Linux:3all versions · fixed in 8.3.8-1
  • php8openSUSE:Tumbleweedall versions · fixed in 8.3.6-1.1
  • php81CleanStartall versions · fixed in 8.1.28-r0
  • php81Alpine:v3.19all versions · fixed in 8.1.28-r0
  • php81Alpaquita:23from 8.1.19-r0 · fixed in 8.1.28-r0
  • php82CleanStartall versions · fixed in 8.2.18-r0

11 more package ranges on OSV.dev

Vendor advisories

  • CVE-2024-1874 Red Hat Product Security54 known affected

    php: Fail to Escape Arguments Properly in Microsoft Windows

    php as a component of Red Hat Enterprise Linux 6 · php-bcmath as a component of Red Hat Enterprise Linux 6 · php-cli as a component of Red Hat Enterprise Linux 6 · +51 more

Full record on NVD

Fix

  1. Update PHP to 8.3.5 · 8.2.18 · 8.1.28
  2. No fix planned, says the vendor Red Hat Product Security CVE-2024-1874 · 54 productsOut of support scope

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Published
2024-04-29
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-pc52-254m-w9w7

Frequently asked questions

What is CVE-2024-1874?

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.

Is CVE-2024-1874 actively exploited?

A proof-of-concept exploit exists for CVE-2024-1874, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-1874?

CVE-2024-1874 has a CVSS v3 base score of 9.4 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record