Skip to content
Fencer Vulns
high 8.2

CVE-2021-21708 json

UAF due to php_filter_float() failing

published 2022-02-27 4 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2021-21708 , BIT-php-2021-21708 , BIT-php-min-2021-21708 , EUVD-2021-8880

cvss
8.2
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
3.0%
EPSS 3.0% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami libphp 7.4.28, 8.0.16, 8.1.3
  • bitnami php 7.4.28, 8.0.16, 8.1.3
  • bitnami php-min 7.4.28, 8.0.16, 8.1.3
  • PHP Group PHP 7.4.28, 8.0.16, 8.1.3
  • php7.4 Debian 11 7.4.28-1+deb11u1

debian advisories DEBIAN-CVE-2021-21708

  • php7.4 Ubuntu 20.04 LTS 7.4.3-4ubuntu2.9
  • php8.1 Ubuntu 22.04 LTS 8.1.2-1ubuntu1

ubuntu advisories UBUNTU-CVE-2021-21708

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libzip RHEL 8, RHEL 8.6 TUS, RHEL 8.6 E4S +4 more 1.6.1-1.module+el8.3.0+6678+b09f589e
  • php RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-gd RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-cli RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-dba RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-dbg RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-ffi RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882
  • php-fpm RHEL 8 7.4.30-1.module+el8.7.0+15886+8e29b882

red hat advisories RHSA-2025:3076RHSA-2025:3016RHSA-2022:7628RHSA-2022:8197RHSA-2022:7624

  • php7 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +10 more 7.4.33-150200.3.46.2
  • php7-test openSUSE Leap 15.3 7.4.33-150200.3.46.2
  • php74 SLE Software Development Kit 12 SP5, SLE Module for Web and Scripting 12 7.4.33-1.47.2
  • php7 SLE Module for Legacy 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
  • php7-fpm SLE Module for Legacy 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
  • php7-test openSUSE Leap 15.4 7.4.33-150400.4.13.2
  • php7-embed SLE Module for Package Hub 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
  • php7-fastcgi SLE Module for Legacy 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1

suse advisories SUSE-SU-2022:4069-1SUSE-SU-2022:4068-1SUSE-SU-2022:3997-1SUSE-SU-2022:0847-1SUSE-SU-2022:0654-1

  • php8 openSUSE Tumbleweed 8.1.3-1.1
  • php7 openSUSE Tumbleweed 7.4.28-1.1
  • php7 openSUSE Leap 15.3 7.4.6-3.35.1
  • php7-test openSUSE Leap 15.3 7.4.6-3.35.1

opensuse advisories openSUSE-SU-2024:11854-1openSUSE-SU-2024:11861-1openSUSE-SU-2022:0847-1

  • php AlmaLinux 9 8.0.20-3.el9
  • php-gd AlmaLinux 9 8.0.20-3.el9
  • php-cli AlmaLinux 9 8.0.20-3.el9
  • php-dba AlmaLinux 9 8.0.20-3.el9
  • php-dbg AlmaLinux 9 8.0.20-3.el9
  • php-ffi AlmaLinux 9 8.0.20-3.el9
  • php-fpm AlmaLinux 9 8.0.20-3.el9
  • php-gmp AlmaLinux 9 8.0.20-3.el9

almalinux advisories ALSA-2022:8197ALSA-2022:7624ALSA-2022:7628

  • php Rocky Linux 9 8.0.20-3.el9
  • php Rocky Linux 8 7.4.30-1.module+el8.7.0+1067+0a7071cc
  • libzip Rocky Linux 8 1.6.1-1.module+el8.6.0+789+2130c178
  • libzip Rocky Linux 8 1.6.1-1.module+el8.4.0+415+e936cba3
  • php-pear Rocky Linux 8 1:1.10.13-1.module+el8.7.0+1067+0a7071cc
  • php-pear Rocky Linux 8 1:1.10.13-1.module+el8.6.0+1006+0d5a469f
  • php-pecl-rrd Rocky Linux 8 2.0.1-1.module+el8.4.0+414+2e7afcdd
  • php-pecl-zip Rocky Linux 8 1.18.2-1.module+el8.6.0+789+2130c178

rocky linux advisories RLSA-2022:8197RLSA-2022:7628RLSA-2022:7624

  • php7 Alpine 3.14 7.4.32-r0
  • php7 Alpine 3.15 7.4.28-r0
  • php8 Alpine 3.15 8.0.16-r0

alpine advisories ALPINE-CVE-2021-21708

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-21708 updated cvss 9.8

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

  • Red Hat Enterprise Linux AppStream (v. 8) php 7.4.30-1.module+el8.7.0+15886+8e29b882, php 8.0.20-2.module+el8.7.0+16187+bb5ab920, libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, libzip 1.7.3-1.module+el8.6.0+13671+84712317, php-gd 7.4.30-1.module+el8.7.0+15886+8e29b882, php-gd 8.0.20-2.module+el8.7.0+16187+bb5ab920, +60 more
    fixed: vendor fix RHSA-2022:7628
  • Red Hat Enterprise Linux AppStream (v. 9) php 8.0.20-3.el9, php-gd 8.0.20-3.el9, php-cli 8.0.20-3.el9, php-dba 8.0.20-3.el9, php-dbg 8.0.20-3.el9, php-ffi 8.0.20-3.el9, +18 more
    fixed: vendor fix RHSA-2022:8197
  • Red Hat Enterprise Linux AppStream AUS (v.8.4) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-gd 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-cli 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dba 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dbg 7.4.6-5.module+el8.4.0+22918+4f86939b.1, +28 more
    fixed: vendor fix RHSA-2025:3076
  • Red Hat Enterprise Linux AppStream AUS (v.8.6) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-gd 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, apcu-panel 5.1.18-1.module+el8.3.0+6678+b09f589e, php-cli 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-dba 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, +28 more
    fixed: vendor fix RHSA-2025:3016
  • Red Hat Enterprise Linux AppStream E4S (v.8.4) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-gd 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-cli 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dba 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dbg 7.4.6-5.module+el8.4.0+22918+4f86939b.1, +28 more
    fixed: vendor fix RHSA-2025:3076
  • Red Hat Enterprise Linux AppStream E4S (v.8.6) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-gd 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, apcu-panel 5.1.18-1.module+el8.3.0+6678+b09f589e, php-cli 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-dba 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, +28 more
    fixed: vendor fix RHSA-2025:3016
  • Red Hat Enterprise Linux AppStream TUS (v.8.4) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-gd 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-cli 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dba 7.4.6-5.module+el8.4.0+22918+4f86939b.1, php-dbg 7.4.6-5.module+el8.4.0+22918+4f86939b.1, +28 more
    fixed: vendor fix RHSA-2025:3076
  • Red Hat Enterprise Linux AppStream TUS (v.8.6) libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-gd 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, apcu-panel 5.1.18-1.module+el8.3.0+6678+b09f589e, php-cli 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, php-dba 7.4.19-4.module+el8.6.0+22924+d3a53e75.1, +28 more
    fixed: vendor fix RHSA-2025:3016
show 1 more
  • Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat Enterprise Linux 7 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +18 more Red Hat Software Collections rh-php73-php, rh-php73-php-gd, rh-php73-php-cli, rh-php73-php-dba, rh-php73-php-dbg, rh-php73-php-fpm, +22 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

cisa ICSA-26-027-02 updated cvss 9.8

Festo Didactic SE MES PC

  • Festo Didactic SE MES PC shipped_with_Windows_10
    affected: vendor fix

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

cisa ICSA-24-102-04 updated cvss 8.2

Siemens RUGGEDCOM APE1808

  • Siemens RUGGEDCOM APE1808
    affected: vendor fix

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

Exploit prediction

3.00% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugs.php.net https://bugs.php.net/bug.php?id=81708 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P
OSV 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
bitnami libphp
>=7.4.0, <7.4.28
>=8.0.0, <8.0.16
>=8.1.0, <8.1.3
7.4.28
8.0.16
8.1.3
bitnami php
>=7.4.0, <7.4.28
>=8.0.0, <8.0.16
>=8.1.0, <8.1.3
7.4.28
8.0.16
8.1.3
bitnami php-min
>=7.4.0, <7.4.28
>=8.0.0, <8.0.16
>=8.1.0, <8.1.3
7.4.28
8.0.16
8.1.3

Affected products

  • PHP Group PHP

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.