CVE-2021-21239Open default xmlsec1 key-type preference
- 6.5MediumCVSS base score
- 1.3%Exploitation in 30 daysEPSS · top 29% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 30 days later
· 30 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 1.3% · top 29% of all CVEs (18 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Affected products
- affected < 6.5.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIpysaml2GHSA-5p3x-r448-pc62 (opens in a new tab)
References
References6
- https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://pypi.org/project/pysaml2 (opens in a new tab)x_refsource_MISCx_transferred
- https://www.aleksey.com/pipermail/xmlsec/2013/009717.html (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99 (opens in a new tab)x_refsource_MISCx_transferred
- [debian-lts-announce] 20210226 [SECURITY] [DLA 2577-1] python-pysaml2 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0211 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-5p3x-r448-pc62 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21239)Record last updated .