CVE-2014-8089: Zend Framework SQL Injection Vulnerability
Summary
CVE-2014-8089: Zend Framework SQL injection vulnerability. Affects zendframework/zendframework1 versions >= 1.12.0, < 1.12.9. Fixed in 1.12.9. 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
The Zend Framework is a popular open-source PHP framework that provides a collection of professional PHP packages for developing web applications. It offers a wide range of features and components for building robust and secure applications. However, versions before 1.12.9, 2.2.x before 2.2.8, and 2.3.x before 2.3.3 are vulnerable to a SQL injection attack when using the sqlsrv PHP extension.
Vulnerability Detail
This vulnerability allows remote attackers to execute arbitrary SQL commands by exploiting a null byte injection. By manipulating the input data, an attacker can inject malicious SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation. The vulnerability affects applications using the affected versions of the Zend Framework with the sqlsrv PHP extension.
How To Fix
Minimum fixed version
1.12.9
This is the first release that contains the fix.
composer require zendframework/zendframework1:1.12.9
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the patched versions is not immediately feasible, a temporary workaround is to disable the sqlsrv PHP extension or implement proper input validation and sanitization to prevent SQL injection attacks. Here is an example of input validation using prepared statements in PHP:
$pdo = new PDO('sqlsrv:Server=localhost;Database=myDB', 'username', 'password');
$stmt = $pdo->prepare('SELECT * FROM users WHERE username = :username');
$stmt->bindParam(':username', $username);
$stmt->execute();
$result = $stmt->fetchAll();
Conclusion
The Zend Framework is vulnerable to a SQL injection attack when using the sqlsrv PHP extension in versions before 1.12.9, 2.2.x before 2.2.8, and 2.3.x before 2.3.3. It is crucial to upgrade to the latest patched versions or apply the recommended workarounds to mitigate the risk of exploitation. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for zendframework/zendframework1 →
FAQ
This vulnerability allows attackers to execute arbitrary SQL commands, potentially leading to unauthorized access, data leakage, or data manipulation.
Versions before 1.12.9, 2.2.x before 2.2.8, and 2.3.x before 2.3.3 are affected.
Yes, the CVSS score for this vulnerability is 9.8, indicating a critical severity level.
At the time of this report, there are no known public exploits available for this vulnerability.
You can find more information about this vulnerability, including the technical details and affected packages, in the advisory on the GitHub Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-qh9w-r7g5-q939/GHSA-qh9w-r7g5-q939.json
Related vulnerabilities
Recent vulnerabilities recorded for zendframework/zendframework1.