QID 150653

Date Published: 2023-03-03

QID 150653: PHP Incorrect Calculation of Buffer Size Vulnerability (CVE-2023-0568)

PHP is a programming language originally designed for use in web-based applications with HTML content. PHP supports a wide variety of platforms and is used by numerous web-based software applications.

The PHP core path resolution function contains a vulnerability where the allocated buffer is one byte too small. When resolving paths with lengths close to the system's MAXPATHLEN setting, the byte after the allocated buffer may be overwritten with a NUL value, potentially leading to unauthorized data access or modification.

Affected Versions:
PHP Versions from 8.0.0 to 8.0.27
PHP Versions from 8.1.0 before 8.1.15
PHP Versions from 8.2.0 before 8.2.2

QID Detection Logic (Unauthenticated):
This QID checks the HTTP Server header to see if the server is running a vulnerable version of PHP.

Successful exploitation of the vulnerability may lead to unauthorized data access or modification. An attacker who exploits this vulnerability may be able to execute arbitrary code, steal sensitive information, or cause a denial-of-service condition.

  • CVSS V3 rated as Critical - 8.1 severity.
  • CVSS V2 rated as Critical - 10 severity.
  • Solution
    Customers are advised to upgrade to the latest version of PHP.
    For more information please refer to Sec Bug 81746 .

    Vendor References

    CVEs related to QID 150653

    Software Advisories
    Advisory ID Software Component Link
    Sec Bug 81746 URL Logo bugs.php.net/bug.php?id=81746