Skip to content
Fencer Vulns
medium 6.5

CVE-2021-21239 json

Open default xmlsec1 key-type preference

published 2021-01-21 5 y ago modified 2026-09-10 1 mo ago also GHSA-5p3x-r448-pc62 , PYSEC-2021-49 , EUVD-2021-0211

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 70%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi pysaml2 6.5.0
  • pysaml2_project pysaml2 6.5.0
  • python-pysaml2 Debian 14, Debian 13, Debian 12 6.5.1-1

debian advisories DEBIAN-CVE-2021-21239

  • python-pysaml2 Ubuntu 18.04 LTS 4.0.2-0ubuntu3.2
  • python-pysaml2 Ubuntu 20.04 LTS 4.9.0-0ubuntu3.1
  • python-pysaml2 Ubuntu 22.04 LTS 6.1.0-0ubuntu2
  • python-pysaml2 Ubuntu Pro 16.04 LTS 3.0.0-3ubuntu1.16.04.4+esm1

ubuntu advisories UBUNTU-CVE-2021-21239

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kibana OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 4.6.6-3.9.2
  • grafana OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 6.7.4-4.18.2
  • cassandra OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 3.11.10-5.3.5
  • python-py OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 1.4.34-3.3.3
  • crowbar-core OpenStack Cloud Crowbar 8 5.0+git.1622489449.a8e60e238-3.50.4
  • python-Django OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 1.11.29-3.25.3
  • ardana-cobbler OpenStack Cloud 8, HPE Helion OpenStack 8 8.0+git.1614096566.e8c2b27-3.44.3
  • openstack-nova OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 16.1.9~dev92-3.48.5

suse advisories SUSE-SU-2021:2554-1SUSE-SU-2021:1962-1

  • python-pysaml2 openSUSE Tumbleweed 7.5.4-1.1
  • python-pysaml2 openSUSE Tumbleweed 7.4.2-1.2

opensuse advisories openSUSE-SU-2026:11524-1openSUSE-SU-2024:14156-1

  • py3-saml2 Alpine 3.13 6.4.1-r1
  • py3-saml2 Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 6.5.0-r0

alpine advisories ALPINE-CVE-2021-21239

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-pysaml2 Arch Linux 6.5.1-1

arch linux advisories AVG-1487

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-21239 updated cvss 6.5

python-pysaml2: An improper verification of cryptographic signature

  • Red Hat OpenStack Platform 10 (Newton) python-pysaml2 Red Hat OpenStack Platform 13 (Queens) python-pysaml2
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat OpenStack Platform 16.1 python3-pysaml2 Red Hat OpenStack Platform 16.2 python3-pysaml2
    affected: workaround, no fix planned “Will not fix”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.29% chance of exploitation in the next 30 days, higher than 70% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • aleksey.com https://www.aleksey.com/pipermail/xmlsec/2013/009717.html referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
GitHub 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
pypi pysaml2
<6.5.0
6.5.0

Affected products

  • IdentityPython pysaml2

Classification

Weakness
  • CWE-347 Improper Verification of Cryptographic Signature

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.