Segv on unknown address in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER in php
Summary
OSV-2023-1098: Segv on unknown address in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER. Affects php across 2 version ranges.
>= 3eba1a876a12d02d478e2d714d6449ed8c9585a9, < ed37ab9d1418db341121164603db47fee6f1bb9c
>= e270ee3008829fa50142ff39b2f6e5d2fa9cc665, < c282e2080f33952d9e03e177e4c184fdd56426bd
Fixed in ed37ab9d1418db341121164603db47fee6f1bb9c. 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 used for web development. It is widely used for creating dynamic web pages and applications. This vulnerability affects the PHP package and is related to the ZEND_HANDLE_EXCEPTION_SPEC_HANDLER function. The function is responsible for handling exceptions in PHP code. However, due to a flaw, a segmentation fault (Segv) occurs on an unknown address, leading to a crash. This vulnerability can potentially be exploited by attackers to cause a denial of service (DoS) or execute arbitrary code.
Vulnerability Detail
The vulnerability occurs in the ZEND_HANDLE_EXCEPTION_SPEC_HANDLER function of the PHP package. When an exception is encountered, this function is called to handle the exception. However, due to a flaw, a segmentation fault occurs on an unknown address. This can result in a crash of the PHP application. An attacker can potentially exploit this vulnerability to cause a denial of service or execute arbitrary code on the affected system. The vulnerability has been reported to the OSS-Fuzz project and more details can be found in the provided link.
How To Fix
Minimum fixed version
ed37ab9d1418db341121164603db47fee6f1bb9c
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 the moment, there is no known workaround for this vulnerability. It is recommended to apply the fix by updating the PHP package to a patched version.
Conclusion
In conclusion, the ZEND_HANDLE_EXCEPTION_SPEC_HANDLER vulnerability in the PHP package can lead to a crash of the application and potentially enable attackers to execute arbitrary code. It is crucial to update the PHP package to a version that includes the fix to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for php →
FAQ
The vulnerability can lead to a crash of the PHP application, potentially causing a denial of service or enabling an attacker to execute arbitrary code.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.
Yes, a patch has been released for this vulnerability. It is recommended to update the PHP package to a version that includes the fix.
There are no known public exploits for this vulnerability at the moment. However, it is important to apply the fix as soon as possible to mitigate the risk.
This vulnerability was discovered and reported by the OSS-Fuzz project. More details can be found in the provided link.
References
Related vulnerabilities
Recent vulnerabilities recorded for php.