bypass CVE-2024-1874

Kurzinfo

Metadaten

  • Original (extern): Link oeffnen
  • Veroeffentlicht: 2024-06-09 18:37 UTC
  • Importiert: 2026-10-07 06:38 UTC
  • CVSS: 9.4
  • Quelle-ID: php_sec
  • uid_hash: acb0dda280a450300a889e4a892ebc807d34a7faa98914aa9ca61a26e3bc179a

Inhalt

Summary

same as CVE-2024-1874

due to the improper handling of command line arguments on Windows, maliciously crafted arguments can inject arbitrary commands even if the bypass_shell option is enabled.

Details

Add a space at the end of filename, others are the same as CVE-2024-1874

PoC

  1. Save the following file as test.bat
echo hello
  1. Save the following file as 1.php, notiece the space at the end of argv-filename
 true));
proc_close($proc);
  1. Run it with PHP and confirm that notepad.exe is popped up.

Impact

Malicious command line arguments in windows platform

Verknuepfte CVEs

CVE-ID Severity (Quelle) CVSS (Quelle) Severity (CVE.org) CVSS (CVE.org) EPSS EPSS-Pctl Veroeffentlicht (CVE.org)

CVE-2024-1874

CRITICAL

9.4

CRITICAL

9.4

2024-04-29

CVE-2024-5585

CRITICAL

9.4

HIGH

7.7

2024-06-09

Quellen-Details

Bezeichnung Name Kategorie Tags Zielgruppe Sprache Feed-URL
PHP Security (php/php-src GHSA)

php_sec

vendor_advisory php, runtime - de https://github.com/php/php-src/security/advisories