Skip to content
Fencer Vulns
medium 6.5

CVE-2021-21238 json

SAML XML Signature wrapping

published 2021-01-21 5 y ago modified 2026-09-10 1 mo ago also GHSA-f4g9-h89h-jgv9 , PYSEC-2021-48 , EUVD-2021-0210

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.1%
EPSS 1.1% chance of exploitation in 30 days, percentile 65%
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. 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.

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-21238

  • 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.24, Alpine 3.23, Alpine 3.22 +8 more 6.5.0-r0

alpine advisories ALPINE-CVE-2021-21238

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-21238 updated cvss 6.5

python-pysaml2: processing of invalid SAML XML documents

  • 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.10% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).

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.