CVEfocus › CVE database › CVE-2021-21708

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

CVSS 8.2 HighEPSS 3.0% (higher than 88% of CVEs)Published 2022-02-27Updated 2024-09-17Assigner: php

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.

CWE-416

What to do

Fixed builds are available from AlmaLinux, Alpine, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

140Fixed
1Fix pending
52Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04php8.1Fixed8.1.2-1ubuntu1UBUNTU-CVE-2021-21708
Ubuntu 20.04php7.4Fixed7.4.3-4ubuntu2.9UBUNTU-CVE-2021-21708
Ubuntu 16.04php7.0Fix pending
Red Hat Enterprise Linux 9phpFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-bcmathFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-cliFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-commonFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-dbaFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-dbgFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-develFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-embeddedFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-enchantFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-ffiFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-fpmFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-gdFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-gmpFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-intlFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-ldapFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-mbstringFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-mysqlndFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-odbcFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-opcacheFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-pdoFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-pgsqlFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-processFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-snmpFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-soapFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 9php-xmlFixed0:8.0.20-3.el9RHSA-2022:8197
Red Hat Enterprise Linux 8apcu-panelFixed0:5.1.20-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8libzipFixed0:1.7.3-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8libzip-develFixed0:1.7.3-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8libzip-toolsFixed0:1.7.3-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8phpFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-bcmathFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-cliFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-commonFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-dbaFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-dbgFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-develFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-embeddedFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-enchantFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-ffiFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-fpmFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-gdFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-gmpFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-intlFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-jsonFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7628
Red Hat Enterprise Linux 8php-ldapFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-mbstringFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-mysqlndFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-odbcFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-opcacheFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-pdoFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-pearFixed1:1.10.13-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8php-pecl-apcuFixed0:5.1.18-1.module+el8.3.0+6678+b09f589eRHSA-2022:7624
Red Hat Enterprise Linux 8php-pecl-apcu-develFixed0:5.1.20-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8php-pecl-rrdFixed0:2.0.1-1.module+el8.3.0+6678+b09f589eRHSA-2022:7624
Red Hat Enterprise Linux 8php-pecl-xdebugFixed0:2.9.5-1.module+el8.3.0+6678+b09f589eRHSA-2022:7628
Red Hat Enterprise Linux 8php-pecl-xdebug3Fixed0:3.1.2-1.module+el8.6.0+13671+84712317RHSA-2022:7624
Red Hat Enterprise Linux 8php-pecl-zipFixed0:1.19.2-1.module+el8.6.0+13671+84712317RHSA-2022:7628
Red Hat Enterprise Linux 8php-pgsqlFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-processFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-snmpFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-soapFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7624
Red Hat Enterprise Linux 8php-xmlFixed0:8.0.20-2.module+el8.7.0+16187+bb5ab920RHSA-2022:7628
Red Hat Enterprise Linux 8php-xmlrpcFixed0:7.4.30-1.module+el8.7.0+15886+8e29b882RHSA-2022:7628
Red Hat Enterprise Linux 7phpNot affected
Red Hat Enterprise Linux 7php-bcmathNot affected
Red Hat Enterprise Linux 7php-cliNot affected
Red Hat Enterprise Linux 7php-commonNot affected
Red Hat Enterprise Linux 7php-dbaNot affected
Red Hat Enterprise Linux 7php-develNot affected
Red Hat Enterprise Linux 7php-embeddedNot affected
Red Hat Enterprise Linux 7php-enchantNot affected
Red Hat Enterprise Linux 7php-fpmNot affected
Red Hat Enterprise Linux 7php-gdNot affected
Red Hat Enterprise Linux 7php-intlNot affected
Red Hat Enterprise Linux 7php-ldapNot affected
Red Hat Enterprise Linux 7php-mbstringNot affected
Red Hat Enterprise Linux 7php-mysqlNot affected
Red Hat Enterprise Linux 7php-mysqlndNot affected
Red Hat Enterprise Linux 7php-odbcNot affected
Red Hat Enterprise Linux 7php-pdoNot affected
Red Hat Enterprise Linux 7php-pgsqlNot affected
Red Hat Enterprise Linux 7php-processNot affected
Red Hat Enterprise Linux 7php-pspellNot affected
Red Hat Enterprise Linux 7php-recodeNot affected
Red Hat Enterprise Linux 7php-snmpNot affected
Red Hat Enterprise Linux 7php-soapNot affected
Red Hat Enterprise Linux 7php-xmlNot affected
Red Hat Enterprise Linux 7php-xmlrpcNot affected
Red Hat Enterprise Linux 6phpNot affected
Red Hat Enterprise Linux 6php-bcmathNot affected
Red Hat Enterprise Linux 6php-cliNot affected
Red Hat Enterprise Linux 6php-commonNot affected
Red Hat Enterprise Linux 6php-dbaNot affected
Red Hat Enterprise Linux 6php-develNot affected
Red Hat Enterprise Linux 6php-embeddedNot affected
Red Hat Enterprise Linux 6php-enchantNot affected
Red Hat Enterprise Linux 6php-fpmNot affected
Red Hat Enterprise Linux 6php-gdNot affected
Red Hat Enterprise Linux 6php-imapNot affected
Red Hat Enterprise Linux 6php-intlNot affected
Red Hat Enterprise Linux 6php-ldapNot affected
Red Hat Enterprise Linux 6php-mbstringNot affected
Red Hat Enterprise Linux 6php-mysqlNot affected
Red Hat Enterprise Linux 6php-odbcNot affected
Red Hat Enterprise Linux 6php-pdoNot affected
Red Hat Enterprise Linux 6php-pgsqlNot affected
Red Hat Enterprise Linux 6php-processNot affected
Red Hat Enterprise Linux 6php-pspellNot affected
Red Hat Enterprise Linux 6php-recodeNot affected
Red Hat Enterprise Linux 6php-snmpNot affected
Red Hat Enterprise Linux 6php-soapNot affected
Red Hat Enterprise Linux 6php-tidyNot affected
Red Hat Enterprise Linux 6php-xmlNot affected
Red Hat Enterprise Linux 6php-xmlrpcNot affected
Red Hat Enterprise Linux 6php-ztsNot affected
AlmaLinux 9phpFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-bcmathFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-cliFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-commonFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-dbaFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-dbgFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-develFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-embeddedFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-enchantFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-ffiFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-fpmFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-gdFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-gmpFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-intlFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-ldapFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-mbstringFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-mysqlndFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-odbcFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-opcacheFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-pdoFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-pgsqlFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-processFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-snmpFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-soapFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 9php-xmlFixed8.0.20-3.el9ALSA-2022:8197
AlmaLinux 8apcu-panelFixed5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:7628
AlmaLinux 8libzipFixed1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux 8libzip-develFixed1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux 8libzip-toolsFixed1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux 8phpFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-bcmathFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-cliFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-commonFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-dbaFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-dbgFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-develFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-embeddedFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-enchantFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-ffiFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-fpmFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-gdFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-gmpFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-intlFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-jsonFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux 8php-ldapFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-mbstringFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-mysqlndFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-odbcFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-opcacheFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-pdoFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-pearFixed1:1.10.13-1.module_el8.6.0+3061+6878dd1bALSA-2022:7628
AlmaLinux 8php-pecl-apcuFixed5.1.18-1.module_el8.6.0+3239+bedf0508ALSA-2022:7624
AlmaLinux 8php-pecl-apcu-develFixed5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux 8php-pecl-rrdFixed2.0.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:7624
AlmaLinux 8php-pecl-xdebugFixed2.9.5-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux 8php-pecl-xdebug3Fixed3.1.2-1.module_el8.6.0+3061+6878dd1bALSA-2022:7624
AlmaLinux 8php-pecl-zipFixed1.18.2-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux 8php-pgsqlFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-processFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-snmpFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-soapFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7624
AlmaLinux 8php-xmlFixed8.0.20-2.module_el8.7.0+3286+6cee236eALSA-2022:7628
AlmaLinux 8php-xmlrpcFixed7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
Rocky Linux 9phpFixed0:8.0.20-3.el9RLSA-2022:8197
Rocky Linux 8libzipFixed0:1.6.1-1.module+el8.6.0+789+2130c178RLSA-2022:7624
Rocky Linux 8phpFixed0:8.0.20-2.module+el8.7.0+1068+7fd2c980RLSA-2022:7628
Rocky Linux 8php-pearFixed1:1.10.13-1.module+el8.6.0+1006+0d5a469fRLSA-2022:7624
Rocky Linux 8php-pecl-apcuFixed0:5.1.18-1.module+el8.4.0+415+e936cba3RLSA-2022:7624
Rocky Linux 8php-pecl-rrdFixed0:2.0.3-1.module+el8.6.0+790+fc63e43fRLSA-2022:7628
Rocky Linux 8php-pecl-xdebugFixed0:2.9.5-1.module+el8.4.0+415+e936cba3RLSA-2022:7628
Rocky Linux 8php-pecl-xdebug3Fixed0:3.1.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:7624
Rocky Linux 8php-pecl-zipFixed0:1.19.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:7628
Alpine Linux 3.15php7Fixed7.4.28-r0ALPINE-CVE-2021-21708
Alpine Linux 3.15php8Fixed8.0.16-r0ALPINE-CVE-2021-21708
Alpine Linux 3.14php7Fixed7.4.32-r0ALPINE-CVE-2021-21708

What the vendor says

As published in the CVE record by php, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.