CVE-2021-21708: UAF due to php_filter_float() failing
Fix #81708: UAF due to phpfilterfloat() failing for ints. (CVE-2021-21708)
Other sources
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 FILTERVALIDATEFLOAT 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 FILTERVALIDATEFLOAT with min/max limits.
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is CVE-2021-21708?
CVE-2021-21708 is a vulnerability in PHP that allows for a use-after-free (UAF) issue due to php_filter_float() failing for ints.
How severe is CVE-2021-21708?
CVE-2021-21708 is considered a moderate severity vulnerability.
Which version of PHP is affected by CVE-2021-21708?
Versions of PHP up to and excluding 7.4.28 are affected by CVE-2021-21708.
How can I fix CVE-2021-21708?
To fix CVE-2021-21708, upgrade to PHP version 7.4.28 or apply the necessary patches as provided by the PHP project.
Where can I find more information about CVE-2021-21708?
More information about CVE-2021-21708 can be found in the PHP changelog at https://www.php.net/ChangeLog-7.php#7.4.28.