UBUNTU-CVE-2021-21239 (CVE-2021-21239)

Vulnerability from osv_ubuntu – Published: 2021-01-21 15:15 – Updated: 2025-09-08 16:46 – Source website
VLAI
Details

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.


{
  "affected": [
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "python-pysaml2",
            "binary_version": "3.0.0-3ubuntu1.16.04.4+esm1"
          },
          {
            "binary_name": "python3-pysaml2",
            "binary_version": "3.0.0-3ubuntu1.16.04.4+esm1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:16.04:LTS",
        "name": "python-pysaml2",
        "purl": "pkg:deb/ubuntu/python-pysaml2@3.0.0-3ubuntu1.16.04.4+esm1?arch=source\u0026distro=esm-infra/xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.0.0-3ubuntu1.16.04.4+esm1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "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"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "python-pysaml2",
            "binary_version": "4.0.2-0ubuntu3.2"
          },
          {
            "binary_name": "python3-pysaml2",
            "binary_version": "4.0.2-0ubuntu3.2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:18.04:LTS",
        "name": "python-pysaml2",
        "purl": "pkg:deb/ubuntu/python-pysaml2@4.0.2-0ubuntu3.2?arch=source\u0026distro=bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.0.2-0ubuntu3.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.0.0-3ubuntu2",
        "4.0.2-0ubuntu2",
        "4.0.2-0ubuntu3",
        "4.0.2-0ubuntu3.1"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "python3-pysaml2",
            "binary_version": "4.9.0-0ubuntu3.1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "python-pysaml2",
        "purl": "pkg:deb/ubuntu/python-pysaml2@4.9.0-0ubuntu3.1?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.9.0-0ubuntu3.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "4.5.0+dfsg1-0ubuntu2",
        "4.9.0-0ubuntu1",
        "4.9.0-0ubuntu2",
        "4.9.0-0ubuntu3"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "python3-pysaml2",
            "binary_version": "6.1.0-0ubuntu2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "python-pysaml2",
        "purl": "pkg:deb/ubuntu/python-pysaml2@6.1.0-0ubuntu2?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "6.1.0-0ubuntu2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [],
  "details": "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.",
  "id": "UBUNTU-CVE-2021-21239",
  "modified": "2025-09-08T16:46:57Z",
  "published": "2021-01-21T15:15:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2021-21239"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0"
    },
    {
      "type": "REPORT",
      "url": "https://pypi.org/project/pysaml2"
    },
    {
      "type": "REPORT",
      "url": "https://www.aleksey.com/pipermail/xmlsec/2013/009717.html"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-5066-1"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-5066-2"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2021-21239"
    }
  ],
  "related": [
    "USN-5066-1",
    "USN-5066-2"
  ],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2021-21239"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.