
CVE catalog
CVE-2021-21239
python-pysaml2: CVE-2021-21239
- Severity
- Medium · CVSS 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 1.29% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | python-pysaml2 | sid | 7.5.4-3 | fixed |
| Debian | python-pysaml2 | forky | 7.5.4-3 | fixed |
| Debian | python-pysaml2 | trixie | 7.5.0-4 | fixed |
| Debian | python-pysaml2 | bookworm | 7.0.1-2 | fixed |
| Ubuntu | python-pysaml2 | pro | 2.4.0-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.1 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.3 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.4 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.4+esm1 | fixed |
| Ubuntu | python-pysaml2 | 18.04 | 3.0.0-3ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3.1 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3.2 | fixed |
| Ubuntu | python-pysaml2 | 20.04 | 4.5.0+dfsg1-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu1 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu3 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu3.1 | fixed |
| Ubuntu | python-pysaml2 | pro | 2.4.0-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.1 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.3 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.4 | vulnerable |
| Ubuntu | python-pysaml2 | pro | 3.0.0-3ubuntu1.16.04.4+esm1 | fixed |
| Ubuntu | python-pysaml2 | 18.04 | 3.0.0-3ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3.1 | vulnerable |
| Ubuntu | python-pysaml2 | 18.04 | 4.0.2-0ubuntu3.2 | fixed |
| Ubuntu | python-pysaml2 | 20.04 | 4.5.0+dfsg1-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu1 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu2 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu3 | vulnerable |
| Ubuntu | python-pysaml2 | 20.04 | 4.9.0-0ubuntu3.1 | fixed |
| Ubuntu | python-pysaml2 | 22.04 | 6.1.0-0ubuntu2 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | python-pysaml2 | source | sid | 6.5.1-1 | not yet assigned | Not reported | [980772] |
| Debian | python-pysaml2 | source | forky | 6.5.1-1 | not yet assigned | Not reported | [980772] |
| Debian | python-pysaml2 | source | trixie | 6.5.1-1 | not yet assigned | Not reported | [980772] |
| Debian | python-pysaml2 | source | bookworm | 6.5.1-1 | not yet assigned | Not reported | [980772] |
| Ubuntu | python-pysaml2 | deb | pro | 3.0.0-3ubuntu1.16.04.4+esm1 | Not reported | USN-5066-2 | Not reported |
| Ubuntu | python-pysaml2 | deb | 18.04 | 4.0.2-0ubuntu3.2 | Not reported | USN-5066-1 | Not reported |
| Ubuntu | python-pysaml2 | deb | 20.04 | 4.9.0-0ubuntu3.1 | Not reported | USN-5066-1 | Not reported |
| Ubuntu | python-pysaml2 | deb | pro | 3.0.0-3ubuntu1.16.04.4+esm1 | Not reported | UBUNTU-CVE-2021-21239 | Not reported |
| Ubuntu | python-pysaml2 | deb | 18.04 | 4.0.2-0ubuntu3.2 | Not reported | UBUNTU-CVE-2021-21239 | Not reported |
| Ubuntu | python-pysaml2 | deb | 20.04 | 4.9.0-0ubuntu3.1 | Not reported | UBUNTU-CVE-2021-21239 | Not reported |
| Ubuntu | python-pysaml2 | deb | 22.04 | 6.1.0-0ubuntu2 | Not reported | UBUNTU-CVE-2021-21239 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [python3-pysaml2]Fixed
Source package: [python-pysaml2]
Details (2)
7.0.1-2· all · bookwormFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12
7.0.1-2· all · bookwormFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12
- [python-pysaml2-doc]Fixed
Source package: [python-pysaml2]
Details (2)
7.0.1-2· all · bookwormFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12
7.0.1-2· all · bookwormFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12
[Debian 13 (Trixie)]
- [python3-pysaml2]Fixed
Source package: [python-pysaml2]
Details (2)
7.5.0-4· all · trixieFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · 13
7.5.0-4· all · trixieFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · 13
- [python-pysaml2-doc]Fixed
Source package: [python-pysaml2]
Details (2)
7.5.0-4· all · trixieFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · 13
7.5.0-4· all · trixieFixed · Fixed:
6.5.1-1dsa · python-pysaml2 · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2026_11524-1.json]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-21239]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-21239]
- [https://osv.dev/vulnerability/USN-5066-1]
- [https://osv.dev/vulnerability/USN-5066-2]
- [https://security-tracker.debian.org/tracker/CVE-2021-21239]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [SUSE security advisories and VEX]