{"api_version":"1","generated_at":"2026-04-12T02:38:54+00:00","cve":"CVE-2021-21239","urls":{"html":"https://cve.report/CVE-2021-21239","api":"https://cve.report/api/cve/CVE-2021-21239.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-21239","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-21239"},"summary":{"title":"CVE-2021-21239","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2021-01-21 15:15:00","updated_at":"2021-03-10 21:00:00"},"problem_types":["CWE-347"],"metrics":[],"references":[{"url":"https://pypi.org/project/pysaml2","name":"https://pypi.org/project/pysaml2","refsource":"MISC","tags":["Product","Third Party Advisory"],"title":"pysaml2 · PyPI","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62","name":"https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62","refsource":"CONFIRM","tags":["Third Party Advisory"],"title":"Unspecified xmlsec1 key-type preference · Advisory · IdentityPython/pysaml2 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html","name":"[debian-lts-announce] 20210226 [SECURITY] [DLA 2577-1] python-pysaml2 security update","refsource":"MLIST","tags":["Mailing List","Third Party Advisory"],"title":"[SECURITY] [DLA 2577-1] python-pysaml2 security update","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0","name":"https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0","refsource":"MISC","tags":["Third Party Advisory"],"title":"Release Version 6.5.0 · IdentityPython/pysaml2 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99","name":"https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99","refsource":"MISC","tags":["Patch","Third Party Advisory"],"title":"Merge pull request from GHSA-5p3x-r448-pc62 · IdentityPython/pysaml2@46578df · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.aleksey.com/pipermail/xmlsec/2013/009717.html","name":"https://www.aleksey.com/pipermail/xmlsec/2013/009717.html","refsource":"MISC","tags":["Exploit","Mailing List","Third Party Advisory"],"title":"[xmlsec] Xmlsec preferring KeyValue element over explicitly loaded\tpublic keys?","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-21239","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21239","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"21239","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"9.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"21239","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"9.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"21239","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"pysaml2_project","cpe5":"pysaml2","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"21239","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"pysaml2_project","cpe5":"pysaml2","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-21239","qid":"179958","title":"Debian Security Update for python-pysaml2 (CVE-2021-21239)"},{"cve":"CVE-2021-21239","qid":"198493","title":"Ubuntu Security Notification for PySAML2 Vulnerability (USN-5066-1)"},{"cve":"CVE-2021-21239","qid":"501681","title":"Alpine Linux Security Update for py3-saml2"},{"cve":"CVE-2021-21239","qid":"501905","title":"Alpine Linux Security Update for py3-saml2"},{"cve":"CVE-2021-21239","qid":"690445","title":"Free Berkeley Software Distribution (FreeBSD) Security Update for pysaml2 (fb67567a-5d95-11eb-a955-08002728f74c)"},{"cve":"CVE-2021-21239","qid":"982936","title":"Python (pip) Security Update for pysaml2 (GHSA-5p3x-r448-pc62)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-21239","STATE":"PUBLIC","TITLE":"Open default xmlsec1 key-type preference"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"pysaml2","version":{"version_data":[{"version_value":"< 6.5.0"}]}}]},"vendor_name":"IdentityPython"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.5,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-347 Improper Verification of Cryptographic Signature"}]}]},"references":{"reference_data":[{"name":"https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62","refsource":"CONFIRM","url":"https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62"},{"name":"https://pypi.org/project/pysaml2","refsource":"MISC","url":"https://pypi.org/project/pysaml2"},{"name":"https://www.aleksey.com/pipermail/xmlsec/2013/009717.html","refsource":"MISC","url":"https://www.aleksey.com/pipermail/xmlsec/2013/009717.html"},{"name":"https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0","refsource":"MISC","url":"https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0"},{"name":"https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99","refsource":"MISC","url":"https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99"},{"refsource":"MLIST","name":"[debian-lts-announce] 20210226 [SECURITY] [DLA 2577-1] python-pysaml2 security update","url":"https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html"}]},"source":{"advisory":"GHSA-5p3x-r448-pc62","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2021-01-21 15:15:00","lastModifiedDate":"2021-03-10 21:00:00","problem_types":["CWE-347"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":6.5,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":3.6},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:N/I:P/A:N","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"PARTIAL","availabilityImpact":"NONE","baseScore":4.3},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:*","versionEndExcluding":"6.5.0","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"21239","Ordinal":"195365","Title":"CVE-2021-21239","CVE":"CVE-2021-21239","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"21239","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"21239","Ordinal":"2","NoteData":"2021-01-21","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"21239","Ordinal":"3","NoteData":"2021-02-26","Type":"Other","Title":"Modified"}]}}}