Process crash or code execution via freed zval
Published Feb 27, 2022 · Updated Sep 17, 2024
Use after free in PHP 7.4 before 7.4.28, 8.0 before 8.0.16, and 8.1 before 8.1.3 allows attackers to crash a PHP process. php_filter_float() destroys the input zval before rejecting an integer outside configured min_range or max_range, leaving the error path to access freed memory. The condition requires code to pass an integer-form string to FILTER_VALIDATE_FLOAT with range limits; a PHP-FPM crash is demonstrated, and the CNA identifies heap overwrite and code execution as possible additional outcomes.
Summary
What happened
Use after free in PHP 7.4 before 7.4.28, 8.0 before 8.0.16, and 8.1 before 8.1.3 allows attackers to crash a PHP process. php_filter_float() destroys the input zval before rejecting an integer outside configured min_range or max_range, leaving the error path to access freed memory. The condition requires code to pass an integer-form string to FILTER_VALIDATE_FLOAT with range limits; a PHP-FPM crash is demonstrated, and the CNA identifies heap overwrite and code execution as possible additional outcomes.
The record
- CVE
- CVE-2021-21708
- Published
- Feb 27, 2022
- Updated
- Sep 17, 2024
- Vendor
- The PHP Group
- Product
- PHP
- Classifications
- CWE-416, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Feb 27, 2022CVE publishedPublication date reported by the CVE source.
- Sep 17, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=7.4.x <7.4.28
- Affected versionversion=8.0.X <8.0.16
- Affected versionversion=8.1.X <8.1.3
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- php-sigsegv proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo