Skip to main content
No exploitation reportedFix available

CVE-2021-21708

No exploitation reported by the sources we read.

  • Published2022-02-27
  • Fixed in8.1.3 · 8.0.16 · 7.4.28
  • WeaknessCWE-416

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-02-2708:15CVE publishedNVD

Versions per branch

NVD · OSV
PHP
BranchAffectedFixed in
8.1≥ 8.1.0, < 8.1.38.1.3
8.0≥ 8.0.0, < 8.0.168.0.16
7.4≥ 7.4.0, < 7.4.287.4.28

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libzipTuxCare:CentOS:8.5all versions · fixed in 1.6.1-1.module_el8.5.0+2017+cc873159and 2 other packages
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.4.0+415+e936cba3
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.6.0+789+2130c178
  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.6.0+790+fc63e43f
  • libzipRed Hat:rhel_tus:8.6::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipRed Hat:rhel_tus:8.4::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipRed Hat:rhel_e4s:8.6::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipRed Hat:rhel_e4s:8.4::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages

144 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-21708 Red Hat Product Security1,571 products fixed

    php: Use after free due to php_filter_float() failing for ints

  • RHSA-2025:3076 Red Hat Product Security319 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • RHSA-2025:3016 Red Hat Product Security465 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • ICSA-24-102-04 CISA1 known affected

    Siemens RUGGEDCOM APE1808

    RUGGEDCOM APE1808

  • SSA-455250 Siemens ProductCERT1 known affected

    SSA-455250: Multiple Vulnerabilities in Palo Alto Networks Virtual NGFW on RUGGEDCOM APE1808 Devices Before V11.1.2-h3

    RUGGEDCOM APE1808

  • ICSA-26-027-02 CISA1 known affected

    Festo Didactic SE MES PC

    Festo Didactic SE MES PC shipped with Windows 10

3 more advisories

Full record on NVD

Fix

  1. Update PHP to 8.1.3 · 8.0.16 · 7.4.28
  2. Vendor fix Red Hat Product Security RHSA-2025:3076 · 319 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix CISA ICSA-24-102-04 · 1 productUpgrade Palo Alto Networks Virtual NGFW V11.1.2-h3. Contact customer support to receive patch and update information
  4. Vendor fix Siemens ProductCERT SSA-455250 · 1 productUpgrade Palo Alto Networks Virtual NGFW V11.1.2-h3. Contact customer support to receive patch and update information
  5. Vendor fix CISA ICSA-26-027-02 · 1 productFesto Didactic has released Factory Control Panel as a replacement for XAMPP on its MES PCs. Contact technical support at services.didactic@festo.com to obtain the current version of Factory Control Panel which includes fixes for these vulnerabilities.
  6. Vendor fix Red Hat Product Security RHSA-2022:8197 · 201 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing the updated packages, the httpd daemon must be restarted for the update to take effect.

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.18.2known since 2026-10-23
  • NVDCVSS 3.19.8read 2026-10-23
  • NVDCVSS 2.06.8read 2026-10-23
  • CNAweakness (CWE)CWE-416known since 2026-10-23
  • NVDweakness (CWE)CWE-416read 2026-10-23
  • FIRST EPSSEPSS score3.0 %2026-11-08
  • OSVaffected packages—
  • GitHub Advisoriesadvisory—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2022-02-27
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-g9qg-rg7j-whhx

Frequently asked questions

What is CVE-2021-21708?

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.

Is CVE-2021-21708 actively exploited?

Active exploitation of CVE-2021-21708 has not been confirmed. Its EPSS score was 3.0% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-21708?

CVE-2021-21708 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record