CVE-2021-21708

UAF due to php_filter_float() failing

At a glance

Severity
HIGH 8.2
EPSS
EPSS 3.00 % · percentile 87 (2026-10-27)
State
PUBLISHED
Published
Updated
Assigner
php
NVD status
Modified

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.

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:Lphp
CVSS 3.1HIGH 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:LNVD · security@php.net (Secondary)
CVSS 3.1CRITICAL 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)
CVSS 2.0MEDIUM 6.8AV:N/AC:M/Au:N/C:P/I:P/A:PNVD · nvd@nist.gov (Primary)

Weaknesses (CWE)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
PHP Group · PHPaffected 7.4.x < 7.4.28 ; affected 8.0.X < 8.0.16 ; affected 8.1.X < 8.1.3

References

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD