CVE-2021-21238
CVE-2021-21238 is a medium-severity vulnerability in Pysaml2 Project Pysaml2 with a CVSS 3.x base score of 6.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-347.
Key facts
- Severity: Medium (CVSS 3.x base score 6.5)
- CVSS v2: 4.3
- EPSS exploit prediction: 1% (61st percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-347
- Affected product: Pysaml2 Project Pysaml2
- Published:
- Last modified:
Description
PySAML2 is a pure python implementation of SAML Version 2 Standard. PySAML2 before 6.5.0 has an improper verification of cryptographic signature vulnerability. All users of pysaml2 that need to validate signed SAML documents are impacted. The vulnerability is a variant of XML Signature wrapping because it did not validate the SAML document against an XML schema. This allowed invalid XML documents to be processed and such a document can trick pysaml2 with a wrapped signature. This is fixed in PySAML2 6.5.0.
Frequently asked questions
- What is CVE-2021-21238?
- PySAML2 is a pure python implementation of SAML Version 2 Standard. PySAML2 before 6.5.0 has an improper verification of cryptographic signature vulnerability. All users of pysaml2 that need to validate signed SAML documents are impacted. The vulnerability is a variant of XML Signature wrapping because it did not validate the SAML document against an XML schema. This allowed invalid XML documents to be processed and such a document can trick pysaml2 with a wrapped signature. This is fixed in PySAML2 6.5.0.
- How severe is CVE-2021-21238?
- CVE-2021-21238 has a CVSS 3.x base score of 6.5, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is none, integrity high, and availability none.
- Is CVE-2021-21238 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (61st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-21238?
- CVE-2021-21238 affects Pysaml2 Project Pysaml2. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-21238?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-21238 published?
- CVE-2021-21238 was published on 2021-01-21 and last updated on 2026-06-17.
References
- https://github.com/IdentityPython/pysaml2/commit/1d8fd268f5bf887480a403a7a5ef8f048157cc14
- https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0
- https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-f4g9-h89h-jgv9
- https://pypi.org/project/pysaml2
Affected products (1)
- cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:*
More vulnerabilities in Pysaml2 Project Pysaml2
- CVE-2016-10127 — Critical (CVSS 9.0): PySAML2 allows remote attackers to conduct XML external entity (XXE) attacks via a crafted SAML XML request or response.
- CVE-2017-1000433 — High (CVSS 8.1): pysaml2 version 4.4.0 and older accept any password when run with python optimizations enabled. This allows attackers…
- CVE-2020-5390 — High (CVSS 7.5): PySAML2 before 5.0.0 does not check that the signature in a SAML document is enveloped and thus signature wrapping is…
- CVE-2016-10149 — High (CVSS 7.5): XML External Entity (XXE) vulnerability in PySAML2 4.4.0 and earlier allows remote attackers to read arbitrary files…
- CVE-2021-21239 — Medium (CVSS 6.5): PySAML2 is a pure python implementation of SAML Version 2 Standard. PySAML2 before 6.5.0 has an improper verification…
- CVE-2017-1000246 — Medium (CVSS 5.3): Python package pysaml2 version 4.4.0 and earlier reuses the initialization vector across encryptions in the IDP server,…
All CVEs affecting Pysaml2 Project Pysaml2 →
Other CWE-347 (Improper Verification of Cryptographic Signature) vulnerabilities
- CVE-2026-48558 — Critical (CVSS 10.0): SimpleHelp versions 5.5.15 and prior and 6.0 pre-release versions contain an authentication bypass vulnerability in the…
- CVE-2023-25574 — Critical (CVSS 10.0): `jupyterhub-ltiauthenticator` is a JupyterHub authenticator for learning tools interoperability (LTI).…
- CVE-2024-45409 — Critical (CVSS 10.0): The Ruby SAML library is for implementing the client side of a SAML authorization. Ruby-SAML in <= 12.2 and 1.13.0 <=…
- CVE-2024-32962 — Critical (CVSS 10.0): xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default…
- CVE-2022-24884 — Critical (CVSS 10.0): ecdsautils is a tiny collection of programs used for ECDSA (keygen, sign, verify). `ecdsa_verify_[prepare_]legacy()`…
- CVE-2021-33885 — Critical (CVSS 10.0): An Insufficient Verification of Data Authenticity vulnerability in B. Braun SpaceCom2 prior to 012U000062 allows a…
Browse all CWE-347 (Improper Verification of Cryptographic Signature) vulnerabilities →