CVEfocus › CVE database › CVE-2021-21238

CVE-2021-21238SAML XML Signature wrapping

CVSS 6.5 MediumEPSS 1.1% (higher than 65% of CVEs)Published 2021-01-21Updated 2024-08-03Assigner: GitHub_M

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.

CWE-347

What to do

Fixed builds are available from Alpine, Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

15Fixed
4Fix pending
3Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04python-pysaml2Not affected
vulnerable_code_not_present
Ubuntu 25.10python-pysaml2Not affected
vulnerable_code_not_present
Ubuntu 24.04python-pysaml2Not affected
vulnerable_code_not_present
Ubuntu 22.04python-pysaml2Fix pendingUBUNTU-CVE-2021-21238
Ubuntu 20.04python-pysaml2Fix pendingUBUNTU-CVE-2021-21238
Ubuntu 18.04python-pysaml2Fix pendingUBUNTU-CVE-2021-21238
Ubuntu 16.04python-pysaml2Fix pendingUBUNTU-CVE-2021-21238
Debian 14python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21238
Debian 13python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21238
Debian 12python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21238
Alpine Linux 3.24py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.23py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.22py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.21py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.20py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.19py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.18py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.17py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.16py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.15py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
Alpine Linux 3.14py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21238
PyPI librarypysaml2Fixed6.5.0GHSA-f4g9-h89h-jgv9

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.