QID 150525

Date Published: 2022-06-16

QID 150525: PHP Input Validation Vulnerability (CVE-2021-21708)

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.

In PHP when using filter functions with FILTER_VALIDATE_FLOAT filter and min/max limits, if the filter fails, there is a possibility to trigger use of allocated memory after free, which can result it crashes, and potentially in overwrite of other memory chunks and RCE. This issue affects: code that uses FILTER_VALIDATE_FLOAT with min/max limits.

Affected versions:
7.4.x below 7.4.28
8.0.x below 8.0.16
8.1.x below 8.1.3

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 allow an attacker to crash the PHP process or Denial of Service (DoS) or Remote Code Execution.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 6.8 severity.
  • Solution
    Customers are advised to upgrade to the latest version of PHP.
    Vendor References

    CVEs related to QID 150525

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