CVE-2021-21239
Open default xmlsec1 key-type preference
Reported by github_m · Published January 21, 2021
pysaml2 is fixed in 6.5.0 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| pysaml2 | PyPI | 6.5.0 |
| pysaml2 | pysaml2_project | 6.5.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| IdentityPython | pysaml2 | < 6.5.0 |
| IdentityPython | pysaml2 | 0 |
Timeline
- Jan 21, 2021 CVE Published
- Jan 21, 2021 PoC Published (2 in total, the first dated here)
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Aug 3, 2024 CVE Updated
- Mar 7, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 7, 2026 Security Advisory (3 in total, the first dated here)
- Aug 26, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-21239
vulnetix vdb fixes CVE-2021-21239
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21239/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- [debian-lts-announce] 20210226 [SECURITY] [DLA 2577-1] python-pysaml2 security update mailing-listx_refsource_MLIST