Ubuntu CVE Tracker
UBUNTU-CVE-2021-21708
Details
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Ubuntu:20.04:LTS | php7.4 | All versions before 7.4.3-4ubuntu2.9 (fixed in 7.4.3-4ubuntu2.9) |
| Ubuntu:22.04:LTS | php8.1 | All versions before 8.1.2-1ubuntu1 (fixed in 8.1.2-1ubuntu1) |
References
- https://ubuntu.com/security/CVE-2021-21708
- https://nakedsecurity.sophos.com/2022/02/18/irony-alert-php-fixes-security-flaw-in-input-validation-code/
- https://www.php.net/ChangeLog-8.php#PHP_8_1
- https://www.php.net/ChangeLog-7.php#PHP_7_4
- https://ubuntu.com/security/notices/USN-5303-1
- https://www.cve.org/CVERecord?id=CVE-2021-21708