CVE-2023-0568 Array overrun in common path resolve code

High 7.5 Published Updated

An array overrun in PHP's path resolution allows attackers to overwrite adjacent memory, potentially leading to unauthorized data access or modification.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-0568?

CVE-2023-0568 is a high-severity memory corruption vulnerability in Php Php, published on 16 Feb 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

In PHP 8.0.X before 8.0.28, 8.1.X before 8.1.16 and 8.2.X before 8.2.3, core path resolution function allocate buffer one byte too small. When resolving paths with lengths close to system MAXPATHLEN setting, this may lead to the byte after the allocated buffer being overwritten with NUL value, which might lead to unauthorized data access or modification.

Weakness: CWE-770, CWE-131

Which versions are affected by CVE-2023-0568?

3 open source packages ship an affected version, including libphp, php and php-min. It affects 1 product.

PackageAffectedFixed in
libphp BitnamiFrom 8.0.08.0.28, 8.1.16, 8.2.3
php BitnamiFrom 8.0.08.0.28, 8.1.16, 8.2.3
php-min BitnamiFrom 8.0.08.0.28, 8.1.16, 8.2.3

Products include Php Php.

How do I fix CVE-2023-0568?

Upgrade libphp to a fixed version for your release line: 8.0.28, 8.1.16 or 8.2.3.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-0568 being exploited?

There is no known exploitation of CVE-2023-0568 in the wild and no public exploit code.

All Php Php vulnerabilities

Sources

Also known as AZL-13587, AZL-63073, BIT-libphp-2023-0568, BIT-php-2023-0568, BIT-php-min-2023-0568, CLSA-2024-1734542452 and 4 more.

Is CVE-2023-0568 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free