Heap-use-after-free in i_zval_ptr_dtor in PHP

php Updated 02 Oct 2025

Summary

04/09/2021
HIGH
Yes i
High
Not published

OSV-2021-1199: Heap-use-after-free in i_zval_ptr_dtor. Affects php versions >= 1902f730ee2bda60552f34c0643e2d7b47e4fb64, < 24ff7eee3f04070d8ab1b31f57d17f0c840185bf. Fixed in 24ff7eee3f04070d8ab1b31f57d17f0c840185bf. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

PHP is a popular general-purpose scripting language widely used for web development. It is known for its flexibility, ease of use, and extensive library support. The vulnerability in question affects the PHP package and is related to a heap-use-after-free issue in the i_zval_ptr_dtor function.

Vulnerability Detail

The vulnerability arises due to a heap-use-after-free condition in the i_zval_ptr_dtor function. This can lead to a crash, specifically a heap-use-after-free read, when certain operations are performed. The vulnerability has been reported and tracked in the OSS-Fuzz project, with more details available in the provided link. The severity of this vulnerability is classified as HIGH.

How To Fix

Minimum fixed version

24ff7eee3f04070d8ab1b31f57d17f0c840185bf

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

At present, no specific workaround has been provided for this vulnerability. It is advised to follow the recommended fix and update the PHP package to a patched version.

Conclusion

In conclusion, the PHP package is affected by a heap-use-after-free vulnerability in the i_zval_ptr_dtor function. It is crucial to update the PHP package to a version that includes the fix to mitigate the vulnerability. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for php →

Share this vulnerability

FAQ

PHP is a popular scripting language used for web development, known for its flexibility and extensive library support.

A heap-use-after-free vulnerability occurs when a program attempts to access memory that has already been freed. This can lead to crashes or potentially exploitable behavior.

OSS-Fuzz is an open-source fuzzing project by Google that aims to find vulnerabilities in open-source software through automated testing.

The severity of this vulnerability is classified as HIGH.

More information about this vulnerability can be found in the provided OSS-Fuzz report link.

Related vulnerabilities

Recent vulnerabilities recorded for php.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

24ff7eee3f04070d8ab1b31f57d17f0c840185bf

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback