VDB

CVE-2021-21708

CVE-2021-21708 PUBLISHED CVSS 8.2 HIGH

UAF due to php_filter_float() failing

Reported by php · Published February 27, 2022

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
libphpBitnami8.1.3, 8.0.16, 7.4.28
php7Alpine7.4.32-r0, 7.4.28-r0
phpBitnami8.1.3, 8.0.16, 7.4.28
php-minBitnami8.1.3, 8.0.16, 7.4.28
php8Alpine8.0.16-r0
phpphp8.1.3, 8.0.16, 7.4.28
libphpBitnami8.1.3, 8.0.16, 7.4.28
phpBitnami8.1.3, 8.0.16, 7.4.28
PHPPHP Group8.1.3, 8.0.16, 7.4.28
php8.1Ubuntu:22.04:LTS8.1.2-1ubuntu1
php7.4Ubuntu:20.04:LTS7.4.3-4ubuntu2.9
php-minBitnami8.1.3, 8.0.16, 7.4.28

Risk scores

CVSS 3.1
8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Affected products

VendorProductVersions
PHP GroupPHP7.4.x, 8.0.X, 8.1.X
PHP GroupPHP7.4.x, 8.0.X, 8.1.X

Timeline

  • Dec 31, 2021 CVE Published
  • Feb 27, 2022 PoC Published (3 in total, the first dated here)
  • Feb 28, 2022 EPSS Score (30 in total, the first dated here)
  • Sep 8, 2025 CVE Updated
  • Mar 7, 2026 Distribution Patch (6 in total, the first dated here)
  • Mar 7, 2026 Security Advisory (9 in total, the first dated here)
  • Aug 26, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-21708
vulnetix vdb fixes CVE-2021-21708

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21708/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

  • x_refsource_MISC
  • x_refsource_CONFIRM
  • GLSA-202209-20 vendor-advisoryx_refsource_GENTOO
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›