Heap-use-after-free vulnerability in php
Summary
OSV-2021-1759: Heap-use-after-free in zend_hash_reverse_apply. Affects php across 2 version ranges.
>= 97cdf62a6a1d8491f8d1ef1580f344400eb51f1d
>= 713dcb28181895d241e6dbe63f63ee654ba757b4, < eee3b1d917591e5106aef9fd4fe93393e95fc13d
No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
PHP is a popular open-source scripting language widely used for web development. It provides a range of features and functionalities to build dynamic websites and applications. However, a vulnerability has been discovered in the PHP package that can lead to a heap-use-after-free issue.
Vulnerability Detail
The vulnerability, identified as OSV-2021-1759, is a heap-use-after-free vulnerability in the zend_hash_reverse_apply function of the PHP package. This vulnerability can be triggered by a specific sequence of operations, resulting in a read of 4 bytes from a freed heap memory block. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
At the moment, there is no known workaround for this vulnerability. It is advised to apply the fix provided by updating the PHP package to a patched version.
Conclusion
The heap-use-after-free vulnerability in the PHP package can pose a significant risk to systems running the affected version. It is crucial to update the PHP package to a patched version that includes the fix to mitigate any potential exploitation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for php →
FAQ
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition on systems running the affected PHP package.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert uses a manifest file like package-lock.json to monitor and alert in real-time for open-source vulnerabilities in the software.
At the time of this report, there is no known public exploit for this vulnerability. However, it is important to apply the recommended fix to mitigate any potential risks.
To exploit this vulnerability, an attacker would need to have the ability to execute arbitrary code on a system running the affected PHP package.
Yes, the vulnerability has been patched in the PHP package. It is recommended to update to a version that includes the fix to ensure the security of your system.
References
Related vulnerabilities
Recent vulnerabilities recorded for php.