Heap-based Buffer Overflow in DNS TXT Record Parsing in php5
Summary
DSA-2961-1: php5 - security update. Affects php5 versions < 5.4.4-14+deb7u11. Fixed in 5.4.4-14+deb7u11. 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 widely used general-purpose scripting language for web application development. It is commonly used to create dynamic web pages and can be embedded into HTML. The php5 package is the PHP interpreter for Debian 7 (wheezy). It allows PHP code to be executed on a web server, enabling the server to generate dynamic web content. However, a vulnerability has been discovered in php5 that could allow a malicious server or man-in-the-middle attacker to execute arbitrary code on the PHP interpreter.
Vulnerability Detail
The vulnerability in php5 is a heap-based buffer overflow in the DNS TXT record parsing. This flaw can be exploited if a PHP application uses the dns_get_record() function to perform a DNS query. By sending a specially crafted DNS response, an attacker can trigger the buffer overflow and potentially execute arbitrary code on the PHP interpreter. This could lead to a complete compromise of the affected system.
How To Fix
Minimum fixed version
5.4.4-14+deb7u11
This is the first release that contains the fix.
sudo apt-get install --only-upgrade php5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the security update to php5 to mitigate the risk of exploitation.
Conclusion
The heap-based buffer overflow vulnerability in php5 can be exploited by a malicious server or man-in-the-middle attacker to execute arbitrary code on the PHP interpreter. To mitigate this risk, it is crucial to upgrade the php5 package to version 5.4.4-14+deb7u11. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for php5 →
FAQ
php5 is the PHP interpreter for Debian 7 (wheezy). It allows PHP code to be executed on a web server, enabling the server to generate dynamic web content.
The vulnerability is a result of a heap-based buffer overflow in the DNS TXT record parsing. It can be triggered if a PHP application uses the dns_get_record() function to perform a DNS query.
If successfully exploited, this vulnerability could allow an attacker to execute arbitrary code on the PHP interpreter. This could lead to a complete compromise of the affected system.
No, there is no known workaround for this vulnerability. It is crucial to apply the security update to php5 to mitigate the risk of exploitation.
To fix this vulnerability, it is recommended to upgrade the php5 package to version 5.4.4-14+deb7u11 for Debian 7 (wheezy). This version includes a patch that addresses the heap-based buffer overflow.
Related vulnerabilities
Recent vulnerabilities recorded for php5.