CVE-2021-21708

Publication date 31 December 2021

Last updated 24 July 2024


Ubuntu priority

Cvss 3 Severity Score

9.8 · Critical

Score breakdown

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.

Read the notes from the security team

Status

Package Ubuntu Release Status
php5 22.04 LTS jammy Not in release
21.10 impish Not in release
20.04 LTS focal Not in release
18.04 LTS bionic Not in release
16.04 LTS xenial Not in release
14.04 LTS trusty
Not affected
php7.0 22.04 LTS jammy Not in release
21.10 impish Not in release
20.04 LTS focal Not in release
18.04 LTS bionic Not in release
16.04 LTS xenial
Not affected
14.04 LTS trusty Not in release
php7.2 22.04 LTS jammy Not in release
21.10 impish Not in release
20.04 LTS focal Not in release
18.04 LTS bionic
Not affected
16.04 LTS xenial Not in release
14.04 LTS trusty Not in release
php7.4 22.04 LTS jammy Not in release
21.10 impish Not in release
20.04 LTS focal
Fixed 7.4.3-4ubuntu2.9
18.04 LTS bionic Not in release
16.04 LTS xenial Not in release
14.04 LTS trusty Not in release
php8.0 22.04 LTS jammy Not in release
21.10 impish
Fixed 8.0.8-1ubuntu0.2
20.04 LTS focal Not in release
18.04 LTS bionic Not in release
16.04 LTS xenial Not in release
14.04 LTS trusty Not in release
php8.1 22.04 LTS jammy
Fixed 8.1.2-1ubuntu1
21.10 impish Not in release
20.04 LTS focal Not in release
18.04 LTS bionic Not in release
16.04 LTS xenial Not in release
14.04 LTS trusty Not in release

Notes


sbeattie

PEAR issues should go against php-pear as of xenial


rodrigo-zaiden

the issue was introduced in PHP 7.4, seems like it was in commit https://github.com/php/php-src/commit/07df6594

Patch details

For informational purposes only. We recommend not to cherry-pick updates. How can I get the fixes?

Package Patch details
php7.4
php8.1

Severity score breakdown

Parameter Value
Base score 9.8 · Critical
Attack vector Network
Attack complexity Low
Privileges required None
User interaction None
Scope Unchanged
Confidentiality High
Integrity impact High
Availability impact High
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H