CVE-2016-10149: XML External Entity (XXE) vulnerability in PySAML2
Summary
CVE-2016-10149: XML External Entity (XXE) vulnerability in PySAML2 4.4.0 and earlier allows remote attackers to read arbitrary files via a crafted SAML XML request or response. Affects pysaml2 across 2 version ranges.
< 4.5.0
< 6e09a25d9b4b7aa7a506853210a9a14100b8bc9b
Fixed in 6e09a25d9b4b7aa7a506853210a9a14100b8bc9b. How to fix ↓
Also tracked for
- python-pysaml2 · Debian:11
The same CVE-2016-10149 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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
PySAML2 is a Python implementation of the SAML 2.0 specification, providing functionality for SAML-based authentication and authorization. It is commonly used in Python applications to enable Single Sign-On (SSO) functionality. PySAML2 versions 4.4.0 and earlier are affected by an XML External Entity (XXE) vulnerability.
Vulnerability Detail
The XML External Entity (XXE) vulnerability in PySAML2 allows remote attackers to read arbitrary files by sending a crafted SAML XML request or response. This vulnerability arises from the improper handling of external entities in the XML parsing process. An attacker can exploit this vulnerability to access sensitive information, such as configuration files, credentials, or other files accessible to the application. The impact of this vulnerability can be severe, as it can lead to unauthorized access, data leakage, or further exploitation of the affected system.
How To Fix
Minimum fixed version
6e09a25d9b4b7aa7a506853210a9a14100b8bc9b
This is the first release that contains the fix.
pip install --upgrade "pysaml2==6e09a25d9b4b7aa7a506853210a9a14100b8bc9b"
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 recommended fix by upgrading to a patched version of PySAML2.
Conclusion
The XML External Entity (XXE) vulnerability in PySAML2 versions 4.4.0 and earlier poses a significant risk to applications utilizing SAML-based authentication and authorization. It is crucial to upgrade to PySAML2 version 4.5.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for pysaml2 →
FAQ
PySAML2 is a Python library that implements the SAML 2.0 specification, providing functionality for SAML-based authentication and authorization.
An XML External Entity (XXE) vulnerability is a type of attack that exploits the improper handling of external entities in XML parsing. It allows an attacker to read arbitrary files or execute remote requests.
This vulnerability can be exploited by sending a crafted SAML XML request or response to the affected PySAML2 library. The attacker can then read arbitrary files accessible to the application.
The consequences of this vulnerability can include unauthorized access to sensitive information, data leakage, or further exploitation of the affected system.
No, there is no known workaround for this vulnerability. It is crucial to apply the recommended fix by upgrading to a patched version of PySAML2.
References
Related vulnerabilities
Recent vulnerabilities recorded for pysaml2.