SAML XML Signature wrapping
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Partial Red Hat: 4 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-347.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| IdentityPython | pysaml2 | before 6.5.0 | 6.5.0 | Patch available | CNA |
| — | pysaml2 (PyPI) | before 6.5.0 | 6.5.0 | Patch available | GHSA-f4g9-h89h-jgv9 |
- pysaml2 VendorIdentityPython Affected before 6.5.0 Fixed in 6.5.0 Patch available CNA
- pysaml2 (PyPI) Vendor— Affected before 6.5.0 Fixed in 6.5.0 Patch available GHSA-f4g9-h89h-jgv9
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:* | before 6.5.0 | Vulnerable | Pysaml2 Project |
- cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:* Versions before 6.5.0 Vulnerable ·Pysaml2 Project
Remediation
- Fix · CNA pysaml2 (IdentityPython) Fixed in 6.5.0
- Fix · GHSA-f4g9-h89h-jgv9 pysaml2 (PyPI) Fixed in 6.5.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenStack Platform 10 (Newton) | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 16.1 | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 16.2 | Affected | No fix planned: Will not fix |
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21238
- 2026-10-03 Alias added: GHSA-f4g9-h89h-jgv9
References
Advisory 4
More Pysaml2 Project Pysaml2 vulnerabilities
- TI-2016-08203 PySAML2 allows remote attackers to conduct XML external entity (XXE) attacks via a crafted SAML XML request or response. CVSS 3.0CRITICAL 9.0
- TI-2016-08225 XML External Entity (XXE) vulnerability in PySAML2 4.4.0 and earlier allows remote… CVSS 3.0HIGH 7.5
- TI-2017-14652 pysaml2 version 4.4.0 and older accept any password when run with python optimizations… CVSS 3.1HIGH 8.1
- TI-2020-04437 PySAML2 before 5.0.0 does not check that the signature in a SAML document is enveloped… CVSS 3.1HIGH 7.5
- TI-2021-04342 Open default xmlsec1 key-type preference CVSS 3.1MEDIUM 6.5
- TI-2017-14561 Python package pysaml2 version 4.4.0 and earlier reuses the initialization vector across… CVSS 3.0MEDIUM 5.3
Sources
- CVE-2021-21238 · CVE Program
- CVE-2021-21238 · NVD
- FIRST EPSS
- GHSA-f4g9-h89h-jgv9 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-21238 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences