6.5
MEDIUM CVSS 3.1
CVE-2021-21239
Open default xmlsec1 key-type preference
Description

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.

INFO

Published Date :

Jan. 21, 2021, 3:15 p.m.

Last Modified :

Nov. 21, 2024, 5:47 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2021-21239 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Debian debian_linux
1 Pysaml2_project pysaml2
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 MEDIUM [email protected]
CVSS 3.1 MEDIUM [email protected]
CVSS 3.1 MEDIUM [email protected]
Solution
A vulnerability in PySAML2 allows for improper verification of cryptographic signatures.
  • Upgrade PySAML2 to version 6.5.0 or later.
  • Update the affected packages.
Public PoC/Exploit Available at Github

CVE-2021-21239 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-21239 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-21239 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

A Dockerized Redash instance that is vulnerable to CVE-2021-21239

security

Shell Python

Updated: 1 month ago
0 stars 0 fork 0 watcher
Born at : Aug. 3, 2025, 3:36 a.m. This repo has been linked 1 different CVEs too.

Report documentation of this script is below

Python

Updated: 1 year, 1 month ago
0 stars 0 fork 0 watcher
Born at : July 18, 2024, 11:02 p.m. This repo has been linked 1 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-21239 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-21239 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99
    Added Reference https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0
    Added Reference https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62
    Added Reference https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html
    Added Reference https://pypi.org/project/pysaml2
    Added Reference https://www.aleksey.com/pipermail/xmlsec/2013/009717.html
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Modified Analysis by [email protected]

    Mar. 10, 2021

    Action Type Old Value New Value
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html No Types Assigned https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Feb. 26, 2021

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2021/02/msg00038.html [No Types Assigned]
  • Initial Analysis by [email protected]

    Jan. 29, 2021

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:N/I:P/A:N)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
    Changed Reference Type https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99 No Types Assigned https://github.com/IdentityPython/pysaml2/commit/46578df0695269a16f1c94171f1429873f90ed99 Patch, Third Party Advisory
    Changed Reference Type https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0 No Types Assigned https://github.com/IdentityPython/pysaml2/releases/tag/v6.5.0 Third Party Advisory
    Changed Reference Type https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62 No Types Assigned https://github.com/IdentityPython/pysaml2/security/advisories/GHSA-5p3x-r448-pc62 Third Party Advisory
    Changed Reference Type https://pypi.org/project/pysaml2 No Types Assigned https://pypi.org/project/pysaml2 Product, Third Party Advisory
    Changed Reference Type https://www.aleksey.com/pipermail/xmlsec/2013/009717.html No Types Assigned https://www.aleksey.com/pipermail/xmlsec/2013/009717.html Exploit, Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:pysaml2_project:pysaml2:*:*:*:*:*:*:*:* versions up to (excluding) 6.5.0
  • CVE Modified by [email protected]

    Jan. 26, 2021

    Action Type Old Value New Value
    Changed Description 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. 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.
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 6.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 4.3
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.60 }} 0.44%

score

0.81031

percentile