{"cve":"CVE-2021-21239","nvd":{"published":"2021-01-21T15:15:14.423","modified":"2026-06-17T03:35:06.293","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5},"cwes":["CWE-347"],"references":["https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99","https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0","https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62","https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html","https://pypi.org/project/pysaml2"],"products":["debian:debian_linux","pysaml2_project:pysaml2"],"source":"nvd","synced_at":"2026-10-19T21:14:10.479542811+00:00"},"epss":{"cve":"CVE-2021-21239","score":0.01291,"percentile":0.7025,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-5p3x-r448-pc62","url":"https://osv.dev/vulnerability/GHSA-5p3x-r448-pc62","summary":"Improper Verification of Cryptographic Signature in PySAML2","modified":"2026-09-10T03:49:13.846262945Z","packages":[{"ecosystem":"PyPI","name":"pysaml2","purl":"pkg:pypi/pysaml2","ranges":["<6.5.0"],"fixed":["6.5.0"]}]},{"id":"PYSEC-2021-49","url":"https://osv.dev/vulnerability/PYSEC-2021-49","summary":"","modified":"2023-11-08T04:04:39.128716Z","packages":[{"ecosystem":"PyPI","name":"pysaml2","purl":"pkg:pypi/pysaml2","ranges":["<6.5.0"],"fixed":["6.5.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}