CVE-2021-21708
JSON

8.2high

UAF due to php_filter_float() failing

Severity
8.2high CVSS:3.1 by php
Exploit likelihood
3.00% (higher than 88% of CVEs)
Published
Last changed
Assigned by
php
Also known as
BIT-LIBPHP-2021-21708BIT-PHP-2021-21708BIT-PHP-MIN-2021-21708

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.

Affected

Product or packageVersionsReported by
PHP Group PHPfrom 7.4.x before 7.4.28, from 8.0.X before 8.0.16, from 8.1.X before 8.1.3CVE List
php phpfrom 7.4.0 before 7.4.28, from 8.0.0 before 8.0.16, from 8.1.0 before 8.1.3NVD
libphp (Bitnami)from 7.4.0 before 7.4.28, from 8.0.0 before 8.0.16, from 8.1.0 before 8.1.3Bitnami Vulnerability Database
php (Bitnami)from 7.4.0 before 7.4.28, from 8.0.0 before 8.0.16, from 8.1.0 before 8.1.3Bitnami Vulnerability Database
php-min (Bitnami)from 7.4.0 before 7.4.28, from 8.0.0 before 8.0.16, from 8.1.0 before 8.1.3Bitnami Vulnerability Database

All scores

php8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P
Bitnami Vulnerability Databasecritical rating

Classification

What each source says

CVE List

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.

NVD (es)

En PHP versiones 7.4.x anteriores a 7.4.28, versiones 8.0.x anteriores a 8.0.16 y versiones 8.1.x anteriores a 8.1.3, cuando son usados funciones de filtrado con el filtro FILTER_VALIDATE_FLOAT y los límites mínimo/máximo, si el filtro falla, se presenta la posibilidad de que sea activado el uso de la memoria asignada después de liberarla, lo que puede resultar en un bloqueo, y potencialmente la sobreescritura de otros trozos de memoria y RCE. Este problema afecta a: el código que usa FILTER_VALIDATE_FLOAT con límites mín/máx.

References

https://bugs.php.net/bug.php?id=81708advisory, exploit, issue-tracking, patch, vendor-advisory
https://security.netapp.com/advisory/ntap-20220325-0004/advisory, third-party-advisory
https://security.gentoo.org/glsa/202209-20advisory, third-party-advisory, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-21708web

Sources

SourceRecordLicence
CVE ListCVE-2021-21708 changed 2024-09-17CVE Terms of Use
NVDCVE-2021-21708 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2021-21708 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2021-21708 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2021-21708 changed 2026-09-08Apache-2.0