CVE-2021-21239
CVE-2021-21239 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% (64th 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. Users of pysaml2 that use the default CryptoBackendXmlSec1 backend and need to verify signed SAML documents are impacted. PySAML2 does not ensure that a signed SAML document is correctly signed. The default CryptoBackendXmlSec1 backend is using the xmlsec1 binary to verify the signature of signed SAML documents, but by default xmlsec1 accepts any type of key found within the given document. xmlsec1 needs to be configured explicitly to only use only _x509 certificates_ for the verification process of the SAML document signature. This is fixed in PySAML2 6.5.0.
Frequently asked questions
- What is CVE-2021-21239?
- PySAML2 is a pure python implementation of SAML Version 2 Standard. PySAML2 before 6.5.0 has an improper verification of cryptographic signature vulnerability. Users of pysaml2 that use the default CryptoBackendXmlSec1 backend and need to verify signed SAML documents are impacted. PySAML2 does not ensure that a signed SAML document is correctly signed. The default CryptoBackendXmlSec1 backend is using the xmlsec1 binary to verify the signature of signed SAML documents, but by default xmlsec1 accepts any type of key found within the given document. xmlsec1 needs to be configured explicitly to only use only _x509 certificates_ for the verification process of the SAML document signature. This is fixed in PySAML2 6.5.0.
- How severe is CVE-2021-21239?
- CVE-2021-21239 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-21239 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (64th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-21239?
- CVE-2021-21239 primarily affects Pysaml2 Project Pysaml2. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-21239?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-21239 published?
- CVE-2021-21239 was published on 2021-01-21 and last updated on 2026-06-17.
References
- https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99
- https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0
- https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62
- https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html
- https://pypi.org/project/pysaml2
- https://www.aleksey.com/pipermail/xmlsec/2013/009717.html
Affected products (2)
- cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
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-21238 — 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 →