p PatchFirst

CVE-2021-21239

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

CVSS 6.5 · Medium · EPSS 1.3% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

apk list -I -o py3-saml2

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Fixes in distributions

Stack: system · python

Affected products and versions

  • pysaml2

    Versions
    • < 6.5.0: Affected

    No fix published

  • py3-saml2 Alpine 3.13

    Affected ranges
    • ECOSYSTEM: < 6.4.1-r1

    Update to 6.4.1-r1

  • py3-saml2 Alpine 3.14

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.15

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.16

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.17

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.18

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.19

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.20

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.21

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.22

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.23

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • py3-saml2 Alpine 3.24

    Affected ranges
    • ECOSYSTEM: < 6.5.0-r0

    Update to 6.5.0-r0

  • python-pysaml2 Debian 12

    Affected ranges
    • ECOSYSTEM: < 6.5.1-1

    Update to 6.5.1-1

  • python-pysaml2 Debian 13

    Affected ranges
    • ECOSYSTEM: < 6.5.1-1

    Update to 6.5.1-1

  • python-pysaml2 Debian 14

    Affected ranges
    • ECOSYSTEM: < 6.5.1-1

    Update to 6.5.1-1

  • pysaml2 PyPI

    Versions
    • 0.4.3
    • 1.0.1
    • 1.0.2
    • 1.0.3
    • 1.1.0
    • 2.0.0
    All versions (45)
    • 2.1.0
    • 2.2.0
    • 2.3.0
    • 2.4.0
    • 3.0.0
    • 3.0.2
    • 4.0.0
    • 4.0.1
    • 4.0.2
    • 4.0.3
    • 4.0.4
    • 4.0.5
    • 4.0.5rc1
    • 4.1.0
    • 4.2.0
    • 4.3.0
    • 4.4.0
    • 4.5.0
    • 4.6.0
    • 4.6.1
    • 4.6.2
    • 4.6.3
    • 4.6.4
    • 4.6.5
    • 4.7.0
    • 4.8.0
    • 4.9.0
    • 5.0.0
    • 5.1.0
    • 5.2.0
    • 5.3.0
    • 5.4.0
    • 6.0.0
    • 6.1.0
    • 6.2.0
    • 6.3.0
    • 6.3.1
    • 6.4.0
    • 6.4.1
    Affected ranges
    • ECOSYSTEM: < 6.5.0

    Update to 6.5.0

  • pysaml2 PyPI

    Versions
    • 0.4.3
    • 1.0.1
    • 1.0.2
    • 1.0.3
    • 1.1.0
    • 2.0.0
    All versions (45)
    • 2.1.0
    • 2.2.0
    • 2.3.0
    • 2.4.0
    • 3.0.0
    • 3.0.2
    • 4.0.0
    • 4.0.1
    • 4.0.2
    • 4.0.3
    • 4.0.4
    • 4.0.5rc1
    • 4.0.5
    • 4.1.0
    • 4.2.0
    • 4.3.0
    • 4.4.0
    • 4.5.0
    • 4.6.0
    • 4.6.1
    • 4.6.2
    • 4.6.3
    • 4.6.4
    • 4.6.5
    • 4.7.0
    • 4.8.0
    • 4.9.0
    • 5.0.0
    • 5.1.0
    • 5.2.0
    • 5.3.0
    • 5.4.0
    • 6.0.0
    • 6.1.0
    • 6.2.0
    • 6.3.0
    • 6.3.1
    • 6.4.0
    • 6.4.1
    Affected ranges
    • GIT: < 46578df0695269a16f1c94171f1429873f90ed99
    • ECOSYSTEM: < 6.5.0

    Update to 6.5.0

  • python-pysaml2 Ubuntu Pro 16.04 LTS

    Versions
    • 2.4.0-0ubuntu2
    • 3.0.0-3ubuntu1
    • 3.0.0-3ubuntu1.16.04.1
    • 3.0.0-3ubuntu1.16.04.3
    • 3.0.0-3ubuntu1.16.04.4
    Affected ranges
    • ECOSYSTEM: < 3.0.0-3ubuntu1.16.04.4+esm1

    Update to 3.0.0-3ubuntu1.16.04.4+esm1

  • python-pysaml2 Ubuntu 18.04 LTS

    Versions
    • 3.0.0-3ubuntu2
    • 4.0.2-0ubuntu2
    • 4.0.2-0ubuntu3
    • 4.0.2-0ubuntu3.1
    Affected ranges
    • ECOSYSTEM: < 4.0.2-0ubuntu3.2

    Update to 4.0.2-0ubuntu3.2

  • python-pysaml2 Ubuntu 20.04 LTS

    Versions
    • 4.5.0+dfsg1-0ubuntu2
    • 4.9.0-0ubuntu1
    • 4.9.0-0ubuntu2
    • 4.9.0-0ubuntu3
    Affected ranges
    • ECOSYSTEM: < 4.9.0-0ubuntu3.1

    Update to 4.9.0-0ubuntu3.1

  • python-pysaml2 Ubuntu 22.04 LTS

    Affected ranges
    • ECOSYSTEM: < 6.1.0-0ubuntu2

    Update to 6.1.0-0ubuntu2

Original sources

Check your server →