Stack-use-after-return in zend_fiber_suspend_context in php

php Updated 02 Oct 2025

Summary

08/05/2021
N/A
Yes i
Unrated
Not published

OSV-2021-736: Stack-use-after-return in zend_fiber_suspend_context. Affects php across 52 version ranges.

>= 0ba0f15256af6c2753a3b4152d5c48f7836efa49 >= 00d8e26d71139234f803c37d0d8b061868882f83 >= 2a069e04036a72249e67d882b57a9b3f39b4b1c3 >= 3b547e6fc4296ee3b1cf5046a4d6e43326b78384 >= 3b52256bd10f5af65da17bfb1f43a960c74a6f54 >= 4ada1c79160bc145a1dac04b4f62835c3510500b >= 6bccb495839e88fc6d79af0246dcc3955bbd9427 >= 6fb3b267969abeb3ec4d447fd157c1b85b960eed >= 7e2d5315ecb37eb37ad096e4aaa8d31705bf1e17 >= 8d89d8027e26d8eea3e137ace01da9c622cb17ac >= 9e2cb7317eb4d246f584eb7dcf8734b6b5d5e938 >= 17e1cd60fc3ec2d753a88dc6073ab0dce8b3a4f1 >= 27b29b815e05e6d15ec31df8f3746f54a09c4328 >= 37ae1b47188f3a282160d9a71d23767cc7cc585e >= 43a909e06817412700ceb76e9fec6474996b844f >= 58eeb00bb33e567cd22cfe3a4c713f2d75768ecb >= 90df9a211aa05a0a015bfb3261effac006f18e82 >= 123db9f56ce6875378bf8e9d05b03f8ab7fdee55 >= 301b7f990af5011a5b468b4fb5a6178b8d5ca66e >= 714fb75d9b74de30d42d77552fb59c38e44ad1ca >= 736bdf7117b735ae163b9eb4ad621fb166abc8ac >= 745ed40cba52f465582f949eb5a3e4dd575b474f >= 899ad830b6c3bd7d3851349bc814b8f87cc94c71 >= 912ddaaf61c93423ede235b7a33c06ff6ed1b1ad >= 1070d62ee72629fa5477324d8b2f982b88a2528f >= 3036e6c4d82de66f4f035d4e9d680d44d1b7ded9 >= 7298d563f7ad724045925a7271c6aef8817a17ff >= 8455d6ade63630b95b6ffb3285728643250109ee >= 8605e1b037f01a2c70603d364d6af4ae3f61b5f3 >= 17209a7088b0ddd1dd3e7827ed0621fc98cd75b7 >= 33926b19d09d54ee43854eb59a987cd812179a7f >= 65269c9b934f7a2ca70cc28369d66633b7d2a19f >= a2d8219e2c4040a610eb2dc8934db7da532b3c61 >= a81a2e407ef85509b2f02b3957f005425895aa78 >= ad8c3adc66bd8744516c96a322cdad6a04205e2b >= b3a855d760d8b66f4b71e0c9d577102be0a8b76b >= b7bce464b7f2ecf1fb0013642590e0e8e20b4e38 >= b59c7c730777b7c21ac27ce6917432c8e6b2023e >= b690e283d0fd782c87f661df40b0f139cb0872c6 >= b925f2a7ec615b2c6fbf1fa54d24affa5c187acd >= b52106f6b984562113d8d871bed975921c20bf97, < ed33262dbbc9a39c43c5de75be6aa89c1a3a71a8 >= c89b7e195ce61545b59c75dfb45a81e56ae7f8eb >= ce4ba5458348fbfd608128da9f4dac21fe836e9d >= d0655ecd026801ed117f9dcd6c6e2bb1aab59ebe >= d2c593017d56b35fb638fb1fb2fe4ea00fbc6698 >= dbae8e906584260eaa4bff15727b6496ac1314eb >= dca939abe583db575f95829da3ad51a58b2baf03 >= dea576766e2a90f2d5ced391b2ab20f1b1a6a2e9 >= e0b6c4ba12df4d24099aa0ba682d4d8a3110c8a8 >= e728aa6cdca4f71a83816f2559c4f53e9506f06d >= e428053dac4a5a6a49d244d848582d5022776c51 >= faf497c2ed60abfab0e8a6782bcd1df51fb73ece, < e5b6f43ec7813392d83ea586b7902e0396a1f792

Fixed in ed33262dbbc9a39c43c5de75be6aa89c1a3a71a8. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PHP is a popular general-purpose scripting language that is widely used for web development. It is known for its flexibility and ease of integration with various web frameworks and databases. The zend_fiber_suspend_context vulnerability affects the PHP package and can lead to a stack-use-after-return issue. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or cause a denial of service.

Vulnerability Detail

The zend_fiber_suspend_context vulnerability arises from a stack-use-after-return issue in the PHP package. This vulnerability allows an attacker to read 4 bytes of memory after it has been freed, potentially leading to information disclosure or arbitrary code execution. The vulnerability can be triggered by calling the zend_fiber_suspend_context function, which is used in the Fiber extension of PHP. Exploiting this vulnerability requires crafting a specific sequence of function calls to trigger the stack-use-after-return condition.

How To Fix

Minimum fixed version

ed33262dbbc9a39c43c5de75be6aa89c1a3a71a8

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

There is currently no known workaround for this vulnerability. It is recommended to apply the fix provided by the PHP package maintainers.

Conclusion

The zend_fiber_suspend_context vulnerability in the PHP package can lead to a stack-use-after-return issue, potentially allowing an attacker to execute arbitrary code or cause a denial of service. It is crucial to update the PHP installation to a version that includes the fix to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for php →

Share this vulnerability

FAQ

This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service by exploiting the stack-use-after-return issue in the zend_fiber_suspend_context function.

There is currently no known public exploit for this vulnerability. However, it is important to apply the fix as soon as possible to mitigate the risk.

The vulnerability was introduced in versions b52106f6b984562113d8d871bed975921c20bf97 and later. It has been fixed in commit ed33262dbbc9a39c43c5de75be6aa89c1a3a71a8 and later versions.

Yes, this vulnerability can be exploited remotely if the affected PHP installation is exposed to the internet and the attacker can send crafted requests to trigger the stack-use-after-return condition.

The only effective mitigation for this vulnerability is to apply the fix provided by the PHP package maintainers. It is recommended to update to a version of PHP that includes the fix.

Related vulnerabilities

Recent vulnerabilities recorded for php.

How To Fix

Minimum fixed version

ed33262dbbc9a39c43c5de75be6aa89c1a3a71a8

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