LiveActive security incident?Get immediate response
CVE Record

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

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.

HighCVSS 8.2Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This PHP flaw can affect applications that validate floating-point input with FILTER_VALIDATE_FLOAT and min/max limits. On vulnerable PHP releases, failed validation can trigger memory use after free, causing crashes and potentially memory corruption or remote code execution. Impact is high where affected code is reachable from web input.

Executive priority

Prioritize remediation for internet-facing PHP applications on affected versions. Business urgency is high if customer input reaches this validation pattern, because sources describe possible service crashes and potential RCE, although active exploitation is not established in the provided evidence.

Technical view

CVE-2021-21708 is a CWE-416 use-after-free in php_filter_float(). It affects PHP 7.4.x before 7.4.28, 8.0.x before 8.0.16, and 8.1.x before 8.1.3 when FILTER_VALIDATE_FLOAT is used with min/max limits and validation fails. CVSS 3.1 is 8.2 with network, unauthenticated, no-user-interaction characteristics.

Likely exposure

Exposure is limited to systems running vulnerable PHP versions and application code that uses FILTER_VALIDATE_FLOAT with min/max limits, especially on request parameters or other untrusted input. PHP installations without that code path are less directly exposed based on the provided sources.

Exploitation context

The source bundle does not show CISA KEV listing or confirmed active exploitation. The CVE description states crashes are possible and memory overwrite or RCE may be possible. Treat reachable web-facing validation paths as higher risk, but do not assume exploitation without environment-specific evidence.

Researcher notes

The vulnerable condition is specific: php_filter_float() handling failed FILTER_VALIDATE_FLOAT checks with min/max limits. Focus analysis on reachable validation failures rather than all PHP float parsing. Public sources identify affected version ranges and impact class but provide limited evidence on exploit reliability or in-the-wild activity.

Mitigation direction

  • Upgrade PHP to 7.4.28, 8.0.16, 8.1.3, or later supported releases.
  • Review vendor advisories for platform-specific backports or package names.
  • Inventory applications using FILTER_VALIDATE_FLOAT with min/max validation limits.
  • Prioritize exposed applications processing untrusted numeric input.
  • Retire unsupported PHP branches where upgrade paths are unavailable.

Validation and detection

  • Check runtime PHP versions across servers, containers, and CI images.
  • Search application code for FILTER_VALIDATE_FLOAT with min_range or max_range options.
  • Confirm vulnerable code paths are reachable from user-controlled input.
  • Verify package advisories from OS, appliance, or hosting vendors.
  • After patching, retest affected validation paths for crashes or regressions.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-21708 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.2 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.2CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L3.94.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.2High
CVSS 3.1 vector shape for CVE-2021-21708Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
PHP GroupPHP7.4.x, 8.0.X, 8.1.XListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.