Use After Free in PHP

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.

Vulnerability class: Use-After-Free

Published · last modified .

CVSS v3 metric

CVSS v3 base score 8.2 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L.

EPSS exploit prediction

EPSS: 0.030 (86.9th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 87th percentile — 86.9% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2021-21708: held from 0.030 to 0.030.

EPSS over last 30 days · oldest: 0.030 · newest: 0.030 · change: 0.000

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2021-21708?
CVE-2021-21708 is a high-severity vulnerability in PHP, classified under Use After Free. CVSS score: 8.2/10. Published 2022-02-27.
How severe is CVE-2021-21708?
High severity. CVSS v3 base score is 8.2 out of 10.
Is CVE-2021-21708 known to be exploited?
3 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.