Dynamic-stack-buffer-overflow in zend_calc_live_ranges in PHP

php Updated 02 Oct 2025

Summary

12/12/2021
N/A
Yes i
Unrated
Not published

OSV-2021-1670: Dynamic-stack-buffer-overflow in zend_calc_live_ranges. Affects php across 2 version ranges.

>= 9c6b843ff0f4b7af926a69ef89d7f9ec1db31866, < 91734fc5795bc07dc718f9d884a014a90097e56f >= efb901ebedf941039241c6194c452f8a16d807aa

Fixed in 91734fc5795bc07dc718f9d884a014a90097e56f. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PHP is a popular open-source programming language widely used for web development. It provides a powerful and flexible platform for building dynamic websites and applications. The vulnerability in question, identified as OSV-2021-1670, affects the PHP package. This vulnerability is related to a dynamic-stack-buffer-overflow in the zend_calc_live_ranges function. The function is part of the PHP compiler and is responsible for calculating live ranges during the compilation process. The vulnerability can potentially lead to a crash due to a read overflow of 4 bytes.

Vulnerability Detail

The vulnerability occurs in the zend_calc_live_ranges function during the pass_two phase of the compilation process in PHP. It is triggered by a dynamic-stack-buffer-overflow, specifically a read overflow of 4 bytes. An attacker could potentially exploit this vulnerability to cause a crash or execute arbitrary code. The vulnerability was reported through the OSS-Fuzz project, and more details can be found in the provided link. The severity of the vulnerability is not specified in the available information.

How To Fix

Minimum fixed version

91734fc5795bc07dc718f9d884a014a90097e56f

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

No specific workaround is mentioned in the available information. It is recommended to apply the fix by updating the PHP package to a version that includes the necessary patch.

Conclusion

In conclusion, the vulnerability OSV-2021-1670 in PHP is related to a dynamic-stack-buffer-overflow in the zend_calc_live_ranges function. It can potentially lead to a crash or arbitrary code execution. To mitigate this vulnerability, it is advised to update the PHP package to a version that includes the necessary fix. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for php →

Share this vulnerability

FAQ

PHP is a popular open-source programming language used for web development. It provides a powerful and flexible platform for building dynamic websites and applications.

zend_calc_live_ranges is a function in the PHP compiler that is responsible for calculating live ranges during the compilation process.

A dynamic-stack-buffer-overflow is a type of buffer overflow vulnerability that occurs when a program writes data beyond the bounds of a dynamically allocated stack buffer.

An attacker could potentially exploit this vulnerability to cause a crash or execute arbitrary code.

Yes, a fix for this vulnerability is available. It is recommended to update the PHP package to a version that includes the fix.

Related vulnerabilities

Recent vulnerabilities recorded for php.

How To Fix

Minimum fixed version

91734fc5795bc07dc718f9d884a014a90097e56f

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