# CVE-2021-21708: UAF due to php_filter_float() failing

- Severity: High 8.2 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.00%, higher than 88% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-02-27T08:00:12.018Z
- Modified: 2026-09-08T08:48:24.859Z
- Also known as: BIT-LIBPHP-2021-21708, BIT-PHP-2021-21708, BIT-PHP-MIN-2021-21708
- Weaknesses: CWE-416
- Assigned by: php

## 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.

(As written by CVE List.)

## Affected

- PHP Group PHP: from 7.4.x before 7.4.28; from 8.0.X before 8.0.16; from 8.1.X before 8.1.3
- php php: from 7.4.0 before 7.4.28; from 8.0.0 before 8.0.16; from 8.1.0 before 8.1.3
- 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.3
- 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.3
- 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.3

## Every score

- php: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

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

## Sources

- CVE List: [CVE-2021-21708](https://www.cve.org/CVERecord?id=CVE-2021-21708), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-21708](https://nvd.nist.gov/vuln/detail/CVE-2021-21708), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2021-21708](https://osv.dev/vulnerability/BIT-LIBPHP-2021-21708), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2021-21708](https://osv.dev/vulnerability/BIT-PHP-2021-21708), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2021-21708](https://osv.dev/vulnerability/BIT-PHP-MIN-2021-21708), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-21708 · Whole record: https://cve.day/CVE-2021-21708.json · Rebuilt by cve.day 2026-11-25T22:58:07.075Z
