CVE-2021-21708

Public Exploit
UAF due to php_filter_float() failing

Description

In PHP versions 7.4.x below 7.4.28, 8.0.x below 8.0.16, and 8.1.x below 8.1.3, 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.

Category

8.2
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.28%
Vendor Advisory gentoo.org Vendor Advisory php.net
Affected: PHP Group PHP
Published at:
Updated at:

References

Link Tags
https://bugs.php.net/bug.php?id=81708 patch exploit vendor advisory issue tracking
https://security.netapp.com/advisory/ntap-20220325-0004/ third party advisory
https://security.gentoo.org/glsa/202209-20 third party advisory vendor advisory

Frequently Asked Questions

What is the severity of CVE-2021-21708?
CVE-2021-21708 has been scored as a high severity vulnerability.
How to fix CVE-2021-21708?
To fix CVE-2021-21708, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-21708 being actively exploited in the wild?
It is possible that CVE-2021-21708 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-21708?
CVE-2021-21708 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.