#VU74185 Buffer overflow in PHP


Published: 2023-03-30

Vulnerability identifier: #VU74185

Vulnerability risk: Low

CVSSv3.1: 6.2 [CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2022-4900

CWE-ID: CWE-119

Exploitation vector: Local

Exploit availability: No

Vulnerable software:
PHP
Universal components / Libraries / Scripting languages

Vendor: PHP Group

Description

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to a boundary error within the php_cli_server_startup_workers() function in sapi/cli/php_cli_server.c when processing PHP_CLI_SERVER_WORKERS environment variable. A local user can trigger memory corruption and execute arbitrary code on the target system.


Mitigation
Install updates from vendor's website.

Vulnerable software versions

PHP: 8.1.0 - 8.1.8, 8.0.0 - 8.0.21, 7.4 - 7.4.33, 7.3 - 7.3.33, 7.2 - 7.2.34, 7.1 - 7.1.33, 7.0 - 7.0.33, 5.5 - 5.5.38, 5.4 - 5.4.45, 5.3 - 5.3.29, 5.2 - 5.2.17, 5.6.0 - 5.6.40, 5.1 - 5.1.6, 5.0 - 5.0.5


External links
http://bugzilla.redhat.com/show_bug.cgi?id=2179880
http://github.com/php/php-src/commit/789a37f14405e2d1a05a76c9fb4ed2d49d4580d5


Q & A

Can this vulnerability be exploited remotely?

No. This vulnerability can be exploited locally. The attacker should have authentication credentials and successfully authenticate on the system.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability