CVE-2012-6531: Zend Framework XEE Vulnerability
Summary
CVE-2012-6531: Zend Framework XEE Vulnerability. Affects zendframework/zendframework1 across 2 version ranges.
>= 1.0, < 1.11.13
>= 1.12.0-rc1, < 1.12.0
Fixed in 1.11.13 or 1.12.0, depending on the release line you run. 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
Zend Framework is an open-source PHP framework that provides a collection of professional PHP packages for building web applications. It offers a robust set of components and tools for developing scalable and secure applications. However, versions 1.x before 1.11.13 and 1.12.x before 1.12.0 of Zend Framework are vulnerable to an XML external entity (XXE) injection attack. This vulnerability affects the Zend_Dom, Zend_Feed, and Zend_Soap components. These components do not properly handle SimpleXMLElement classes, allowing remote attackers to read arbitrary files or create TCP connections via an external entity reference in a DOCTYPE element in an XML-RPC request.
Vulnerability Detail
The XML external entity (XXE) injection vulnerability in Zend Framework allows an attacker to exploit the affected components by injecting malicious XML content. By leveraging this vulnerability, an attacker can read arbitrary files or establish TCP connections, potentially leading to unauthorized access, data leakage, or remote code execution. This vulnerability is different from CVE-2012-3363 and poses a moderate risk to applications utilizing the vulnerable versions of Zend Framework.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 1.0, < 1.11.131.11.13composer require zendframework/zendframework1:1.11.13 -
>= 1.12.0-rc1, < 1.12.01.12.0composer require zendframework/zendframework1:1.12.0
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
If upgrading to the fixed versions is not immediately feasible, a workaround can be implemented by disabling external entity expansion in the affected components. This can be achieved by modifying the code to explicitly disable entity expansion or by configuring the XML parser to ignore external entities. Here is an example of how to disable entity expansion in the Zend_Dom component:
$dom = new Zend_Dom();
$dom->setOptions(['disableEntityExpansion' => true]);
Please note that this workaround may affect the functionality of the components and should be used as a temporary solution until the upgrade can be performed.
Conclusion
The Zend Framework XEE vulnerability (CVE-2012-6531) poses a moderate risk to applications utilizing vulnerable versions of Zend Framework. To mitigate this vulnerability, it is crucial to upgrade to the fixed versions (1.11.13 or later for versions 1.x, and 1.12.0 or later for versions 1.12.x) or apply the provided workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for zendframework/zendframework1 →
FAQ
Zend Framework is an open-source PHP framework that provides a collection of professional PHP packages for building web applications. It offers a robust set of components and tools for developing scalable and secure applications.
Versions 1.x before 1.11.13 and 1.12.x before 1.12.0 of Zend Framework are affected by this vulnerability.
An XML external entity (XXE) injection attack is a type of vulnerability that allows an attacker to exploit XML parsers by injecting malicious XML content. By leveraging this vulnerability, an attacker can read arbitrary files or establish TCP connections, potentially leading to unauthorized access, data leakage, or remote code execution.
Yes, there is a fix available for this vulnerability. It is recommended to upgrade to the fixed versions of Zend Framework (1.11.13 or later for versions 1.x, and 1.12.0 or later for versions 1.12.x).
Yes, a workaround is available for this vulnerability. It involves disabling external entity expansion in the affected components. However, this workaround may affect the functionality of the components and should be used as a temporary solution until the upgrade can be performed.
Related vulnerabilities
Recent vulnerabilities recorded for zendframework/zendframework1.