CVE-2021-21238: SAML XML Signature wrapping
Vulnerability summary
CVE-2021-21238 is a medium (CVSS 6.5) vulnerability in identitypython pysaml2. EPSS estimates a 1.10% chance of exploitation in the next 30 days, higher than 65.6% of scored vulnerabilities.
Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 21-01-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 6 sources · 2 versions- OSV · PypiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- NVDNIST6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- OSV · AlpineEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
EPSS trend
Probability
1.10%
Chance of exploitation in the next 30 days
Percentile
66%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 1.08% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- py3-saml2< 6.5.0-r0
Debian1 product
- python-pysaml2< 6.5.1-1
Identitypython1 product
- pysaml2< 6.5.0
PyPI1 product
- pysaml2< 1d8fd268f5bf887480a403a7a5ef8f048157cc14 | < 6.5.0
Pysaml2_project1 product
- pysaml2< 6.5.0
Ubuntu1 product
- python-pysaml2All versions (No fix recorded)
6 vendors · 6 products
References
11 links- github.com/IdentityPython/pysaml2/security/advisories/GHSA-f4g9-h89h-jgv9X Refsource CONFIRMWEBAdvisoryREPORTThird Party Advisory
- github.com/IdentityPython/pysaml2/commit/1d8fd268f5bf887480a403a7a5ef8f048157cc14X Refsource MISCWEBFIXPatchThird Party Advisory