CVE-2021-21708 | UAF due to php_filter_float() failing

Exp

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.

Published: 2022-02-27 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-21708 is rated High Exploit Risk (80.5/100): CVSS High severity, with medium exploitation likelihood (EPSS 3.00%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +2.78% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-21708

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-21708

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.22% 3.00% +2.78%
2 2026-04-15 0.27% 0.22% -0.05%
3 2025-12-31 0.27%

Full EPSS history (20 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-21708

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.2 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 4.2 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2021-21708

OS Trackers for CVE-2021-21708

vendor priority summary link
alpine critical CVE-2021-21708: 1 source package rows (php7); 1 state rows across 1 repos (edge-community); fixed 1, open 0. https://security.alpinelinux.org/vuln/CVE-2021-21708
debian not yet assigned CVE-2021-21708 not yet assigned priority: Debian including 1 source packages (php7.4), 1 status rows across 1 suites (bullseye): resolved 1. https://security-tracker.debian.org/tracker/CVE-2021-21708
gentoo high CVE-2021-21708: 1 GLSA(s) (202209-20), 1 atom(s) (dev-lang/php); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-21708
redhat high https://access.redhat.com/security/cve/CVE-2021-21708
suse high CVE-2021-21708 severity important: SUSE including 645 source package names (apache2-mod_php5, apache2-mod_php53, …), 1889 product×package rows across 47 product lines (SUSE CaaS Platform 4.0, SUSE Enterprise Storage 6, … (47 product lines)): Fixed 1158, Known Not Affected 731. https://www.suse.com/security/cve/CVE-2021-21708/
ubuntu medium CVE-2021-21708 medium priority: Ubuntu including 6 source packages (php5, php7.0, php7.2, php7.4, php8.0, php8.1), 42 status rows across 7 suites (bionic, focal, impish, jammy, trusty, upstream, xenial): DNE 30, not-affected 6, released 5, needs-triage 1. https://ubuntu.com/security/CVE-2021-21708

Affected software / configurations for CVE-2021-21708

Vendor Product Version Raw CPE
php php >= 7.4.0, < 7.4.28 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.0.0, < 8.0.16 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.1.0, < 8.1.3 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*

References for CVE-2021-21708

URL Tags
https://bugs.php.net/bug.php?id=81708 Exploit Issue Tracking Patch Vendor Advisory
https://security.gentoo.org/glsa/202209-20 Third Party Advisory
https://security.netapp.com/advisory/ntap-20220325-0004/ Third Party Advisory
cvelogic Threat Intelligence