CVE catalog

CVE-2021-21239

python-pysaml2: CVE-2021-21239

[CVE catalog]

Severity
Medium · CVSS 6.5CVSS: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.

DistributionPackageReleaseVersionStatus
Debianpython-pysaml2sid7.5.4-3fixed
Debianpython-pysaml2forky7.5.4-3fixed
Debianpython-pysaml2trixie7.5.0-4fixed
Debianpython-pysaml2bookworm7.0.1-2fixed
Ubuntupython-pysaml2pro2.4.0-0ubuntu2vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.1vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.3vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.4vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.4+esm1fixed
Ubuntupython-pysaml218.043.0.0-3ubuntu2vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu2vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3.1vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3.2fixed
Ubuntupython-pysaml220.044.5.0+dfsg1-0ubuntu2vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu1vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu2vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu3vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu3.1fixed
Ubuntupython-pysaml2pro2.4.0-0ubuntu2vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.1vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.3vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.4vulnerable
Ubuntupython-pysaml2pro3.0.0-3ubuntu1.16.04.4+esm1fixed
Ubuntupython-pysaml218.043.0.0-3ubuntu2vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu2vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3.1vulnerable
Ubuntupython-pysaml218.044.0.2-0ubuntu3.2fixed
Ubuntupython-pysaml220.044.5.0+dfsg1-0ubuntu2vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu1vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu2vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu3vulnerable
Ubuntupython-pysaml220.044.9.0-0ubuntu3.1fixed
Ubuntupython-pysaml222.046.1.0-0ubuntu2fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpython-pysaml2sourcesid6.5.1-1not yet assignedNot reported[980772]
Debianpython-pysaml2sourceforky6.5.1-1not yet assignedNot reported[980772]
Debianpython-pysaml2sourcetrixie6.5.1-1not yet assignedNot reported[980772]
Debianpython-pysaml2sourcebookworm6.5.1-1not yet assignedNot reported[980772]
Ubuntupython-pysaml2debpro3.0.0-3ubuntu1.16.04.4+esm1Not reportedUSN-5066-2Not reported
Ubuntupython-pysaml2deb18.044.0.2-0ubuntu3.2Not reportedUSN-5066-1Not reported
Ubuntupython-pysaml2deb20.044.9.0-0ubuntu3.1Not reportedUSN-5066-1Not reported
Ubuntupython-pysaml2debpro3.0.0-3ubuntu1.16.04.4+esm1Not reportedUBUNTU-CVE-2021-21239Not reported
Ubuntupython-pysaml2deb18.044.0.2-0ubuntu3.2Not reportedUBUNTU-CVE-2021-21239Not reported
Ubuntupython-pysaml2deb20.044.9.0-0ubuntu3.1Not reportedUBUNTU-CVE-2021-21239Not reported
Ubuntupython-pysaml2deb22.046.1.0-0ubuntu2Not reportedUBUNTU-CVE-2021-21239Not reported

[Debian bug #980772]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [python-pysaml2]

    Details (2)
    • 7.0.1-2 · all · bookworm

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12

    • 7.0.1-2 · all · bookworm

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12

  • Source package: [python-pysaml2]

    Details (2)
    • 7.0.1-2 · all · bookworm

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12

    • 7.0.1-2 · all · bookworm

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · bookworm; dsa · python-pysaml2 · debian · 12

[Debian 13 (Trixie)]

  • Source package: [python-pysaml2]

    Details (2)
    • 7.5.0-4 · all · trixie

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · 13

    • 7.5.0-4 · all · trixie

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · 13

  • Source package: [python-pysaml2]

    Details (2)
    • 7.5.0-4 · all · trixie

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · 13

    • 7.5.0-4 · all · trixie

      Fixed · Fixed: 6.5.1-1

      dsa · python-pysaml2 · debian · 13

Observed:

References