CVE-2016-10127: Pysaml2 PySAML2 XML External Entity Attack Vulnerability
CRITICALCVE-2016-10127 is a CRITICAL (CVSS 9.0) pysaml2 xml external entity attack vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Pysaml2 libraries in the PyPI ecosystem. The issue involves pysaml2 xml external entity attack. Remediation is available by upgrading affected packages to version 4.5.0.
CVE-2016-10127 at a Glance
Security Impact
CVSS: 9.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2016-10127
To remediate this vulnerability, upgrade all affected Pysaml2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pysaml2>=4.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pysaml2
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-10127, inspect your installed packages using pip:
pip show pysaml2
Analyze the terminal output to locate any version of Pysaml2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.0), your application is affected.
Note: The pip show pysaml2 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Pysaml2, 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-2016-10127 Affected Pysaml2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pysaml2
|
PyPI |
< 4.5.0
|
4.5.0
|
References
Frequently Asked Questions
What is CVE-2016-10127?
Which Pysaml2 versions are affected?
What version fixes CVE-2016-10127?
Is pysaml2 affected?
What is the CVSS score of CVE-2016-10127?
What CWE is associated with CVE-2016-10127?
How can I check PyPI dependencies for CVE-2016-10127?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m269-wj6g-c459",
"modified" : "2024-10-24T21:52:38Z",
"published" : "2022-05-17T02:56:23Z",
"aliases" : [ "CVE-2016-10127" ],
"summary" : "PySAML2 XML external entity attack",
"details" : "PySAML2 allows remote attackers to conduct XML external entity (XXE) attacks via a crafted SAML XML request or response.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pysaml2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10127"
}, {
"type" : "WEB",
"url" : "https://github.com/rohe/pysaml2/issues/366"
}, {
"type" : "WEB",
"url" : "https://github.com/rohe/pysaml2/pull/379"
}, {
"type" : "WEB",
"url" : "https://github.com/rohe/pysaml2/commit/6e09a25d9b4b7aa7a506853210a9a14100b8bc9b"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850716"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-m269-wj6g-c459"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pysaml2/PYSEC-2017-67.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rohe/pysaml2"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200227195127/http://www.securityfocus.com/bid/95376"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2017/01/19/5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T21:31:28Z",
"nvd_published_at" : "2017-03-03T15:59:00Z"
}
}