CVE-2024-5585

Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)

State
Published
Severity
7.7 High
Published
Jun 9, 2024
Updated
Feb 13, 2025
Reserved
Jun 1, 2024

Read the record on cve.org

Description

In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, the fix for CVE-2024-1874 does not work if the command name includes trailing spaces. Original issue: 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.

Scores

CVSSScoreVectorSource
3.17.7 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Lphp

Weaknesses

  • CWE-116 Improper Encoding or Escaping of Output
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Affected Products

ProductVersions
PHPPHP Group
  • 8.1.* to before 8.1.29Affected
  • 8.2.* to before 8.2.20Affected
  • 8.3.* to before 8.3.8Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.