PHP on Windows 8.1.x < 8.1.29 / 8.2.x < 8.2.20 / 8.3.x < 8.3.8 Arbitrary Code Execution (CVE-2024-4577)

critical Nessus Plugin ID 214953

Synopsis

An application installed on the remote Windows host is affected by an arbitrary code execution vulnerability.

Description

The version of PHP: Hypertext Preprocessor detected on the remote Windows host is 8.1.x prior to 8.1.29, 8.2.x prior to 8.2.20, or 8.3.x prior to 8.3.8. It is, therefore, affected by an arbitrary code execution vulnerability:

- In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use 'Best-Fit' behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc. (CVE-2024-4577)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to PHP: Hypertext Preprocessor version 8.1.29, 8.2.20, 8.3.8, or later.

See Also

https://www.php.net/ChangeLog-8.php#8.1.29

https://www.php.net/ChangeLog-8.php#8.2.20

https://www.php.net/ChangeLog-8.php#8.3.8

Plugin Details

Severity: Critical

ID: 214953

File Name: php_CVE-2024-4577.nasl

Version: 1.3

Type: local

Agent: windows

Family: Windows

Published: 2/4/2025

Updated: 2/5/2025

Configuration: Enable thorough checks

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Critical

Score: 9.6

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 8.7

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2024-4577

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 9.4

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:H/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:php:php

Required KB Items: installed_sw/PHP, SMB/Registry/Enumerated

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 6/6/2024

Vulnerability Publication Date: 6/6/2024

CISA Known Exploited Vulnerability Due Dates: 7/3/2024

Exploitable With

Metasploit (PHP CGI Argument Injection Remote Code Execution)

Reference Information

CVE: CVE-2024-4577