CVE-2015-5161: Zendframework/zendframework ZendXml And Zend Framework Contain Vulnerability
MODERATECVE-2015-5161 is a MODERATE zendxml and zend framework contain vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Zendframework/zendframework libraries in the Packagist ecosystem. The issue involves zendxml and zend framework contain xxe and xee vulnerabilities. Remediation is available by upgrading affected packages to version 2.4.6, 2.5.2, 1.12.14, 1.0.1.
CVE-2015-5161 at a Glance
How to Fix CVE-2015-5161
To remediate this vulnerability, upgrade all affected Zendframework/zendframework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade zendframework/zendframework to 2.4.6
Upgrade zendframework/zendframework to 2.5.2
Upgrade zendframework/zendframework1 to 1.12.14
Upgrade zendframework/zendxml to 1.0.1
Upgrade zendframework/zendframework to 1.12.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for zendframework/zendframework
How to Check if You Are Affected
To determine whether your application is affected by CVE-2015-5161, inspect your project dependencies for Zendframework/zendframework:
inspect dependencies for zendframework/zendframework
Analyze the terminal output to locate any version of Zendframework/zendframework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Zendframework/zendframework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-5161 Affected Zendframework/zendframework Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zendframework/zendframework
|
Packagist |
≥ 2.0.0
< 2.4.6
|
2.4.6
|
|
zendframework/zendframework
|
Packagist |
≥ 2.5.0
< 2.5.2
|
2.5.2
|
|
zendframework/zendframework1
|
Packagist |
≥ 1.12.0
< 1.12.14
|
1.12.14
|
|
zendframework/zendxml
|
Packagist |
≥ 1.0.0
< 1.0.1
|
1.0.1
|
|
zendframework/zendframework
|
Packagist |
≥ 1.12.0
< 1.12.14
|
1.12.14
|
References
Frequently Asked Questions
What is CVE-2015-5161?
Which Zendframework/zendframework versions are affected?
What version fixes CVE-2015-5161?
Is zendframework/zendframework affected?
Is zendframework/zendframework1 affected?
What CWE is associated with CVE-2015-5161?
How can I check Packagist dependencies for CVE-2015-5161?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xp8p-9rq5-4wgv",
"modified" : "2023-08-03T21:53:46Z",
"published" : "2022-05-17T03:16:37Z",
"aliases" : [ "CVE-2015-5161" ],
"summary" : "ZendXml and Zend Framework contain XXE and XEE Vulnerabilities",
"details" : "The `Zend_Xml_Security::scan` in ZendXml before 1.0.1 and Zend Framework before 1.12.14, 2.x before 2.4.6, and 2.5.x before 2.5.2, when running under PHP-FPM in a threaded environment, allows remote attackers to bypass security checks and conduct XML external entity (XXE) and XML entity expansion (XEE) attacks via multibyte encoded characters.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.12.0"
}, {
"fixed" : "1.12.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendxml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.12.0"
}, {
"fixed" : "1.12.14"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-5161"
}, {
"type" : "WEB",
"url" : "https://github.com/zendframework/zf1/issues/393"
}, {
"type" : "WEB",
"url" : "https://github.com/zendframework/ZendXml/commit/79f478fa2af85ce1fc18ac132dee5aa714c3b532"
}, {
"type" : "WEB",
"url" : "https://github.com/zendframework/zf1/commit/ff7edddf1410b44b5ead857c02698aad9f748d1b"
}, {
"type" : "WEB",
"url" : "https://framework.zend.com/security/advisory/ZF2015-06"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/CVE-2015-5161.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework1/CVE-2015-5161.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendxml/CVE-2015-5161.yaml"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200228055156/http://www.securityfocus.com/bid/76177"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/37765"
}, {
"type" : "WEB",
"url" : "http://framework.zend.com/security/advisory/ZF2015-06"
}, {
"type" : "WEB",
"url" : "http://legalhackers.com/advisories/zend-framework-XXE-vuln.txt"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/164409.html"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/165147.html"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/165173.html"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/133068/Zend-Framework-2.4.2-1.12.13-XXE-Injection.html"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2015/Aug/46"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2015/dsa-3340"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/76177"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611", "CWE-776" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-03T21:53:46Z",
"nvd_published_at" : "2015-08-25T17:59:00Z"
}
}