CVEfocus › CVE database › CVE-2021-21239

CVE-2021-21239Open default xmlsec1 key-type preference

CVSS 6.5 MediumEPSS 1.3% (higher than 70% 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. 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.

CWE-347

What to do

Fixed builds are available from Alpine, Debian, PyPI, Ubuntu: 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

19Fixed
1Fix pending

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 22.04python-pysaml2Fixed6.1.0-0ubuntu2UBUNTU-CVE-2021-21239
Ubuntu 20.04python-pysaml2Fixed4.9.0-0ubuntu3.1UBUNTU-CVE-2021-21239
Ubuntu 18.04python-pysaml2Fixed4.0.2-0ubuntu3.2UBUNTU-CVE-2021-21239
Ubuntu 16.04python-pysaml2Fix pending3.0.0-3ubuntu1.16.04.4+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-21239
Debian 14python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21239
Debian 13python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21239
Debian 12python-pysaml2Fixed6.5.1-1DEBIAN-CVE-2021-21239
Alpine Linux 3.24py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.23py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.22py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.21py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.20py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.19py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.18py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.17py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.16py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.15py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.14py3-saml2Fixed6.5.0-r0ALPINE-CVE-2021-21239
Alpine Linux 3.13py3-saml2Fixed6.4.1-r1ALPINE-CVE-2021-21239
PyPI librarypysaml2Fixed6.5.0GHSA-5p3x-r448-pc62

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.