CVE-2021-21238
MEDIUM 6.5CVSS 3.1SAML XML Signature wrapping in PySAML2
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.
- Published
- 21 Jan 2021
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-347
- Also known as
- GHSA-f4g9-h89h-jgv9PYSEC-2021-48
- Sources
- NVDJSONOSV GHSA-f4g9-h89h-jgv9JSONOSV PYSEC-2021-48JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pysaml2_project | pysaml2cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:* |
< 6.5.0 | 6.5.0 |
| OSV | PyPI | pysaml2 | < 6.5.0 | 6.5.0 |
References
- https://github.com/IdentityPython/pysaml2/commit/1d8fd268f5bf887480a403a7a5ef8f048157cc14 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0 · Third Party Advisory, WEB
- https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-f4g9-h89h-jgv9 · Third Party Advisory, WEB, ADVISORY
- https://pypi.org/project/pysaml2 · Product, Third Party Advisory, WEB, PACKAGE
- https://nvd.nist.gov/vuln/detail/CVE-2021-21238 · ADVISORY
- https://github.com/IdentityPython/pysaml2 · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pysaml2/PYSEC-2021-48.yaml · WEB
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 21 Jan 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 21 Jan 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 21 Jan 2021)