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...
Critical CVSS 9.8
- CVE id
- CVE-2021-21708
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PHP Runtimes and servers |
>= 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 |
How to fix it
Upgrade PHP to the fixed release of the line you run: 7.4.28, 8.0.16, 8.1.3.
php --version
- Install the patched PHP release of your minor line (the php image tag or your OS packages) and restart PHP-FPM.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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 FILTERVALIDATEFLOAT 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 FILTERVALIDATEFLOAT with min/max limits.
References
- CVE-2021-21708 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2021-21708
- Web: https://bugs.php.net/bug.php?id=81708
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20220325-0004/
- Web: https://bugs.php.net/bug.php?id=81708
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20220325-0004/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.