Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    GHSA-GWP4-MCV4-W95J

    Vulnerability from github – Published: 2022-09-21 16:58 – Updated: 2022-09-21 16:58
    VLAI
    Summary
    jwcrypto token substitution can lead to authentication bypass
    Details

    The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token. Quoting the private disclosure we received : "Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation." This substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT. The significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.

    Several mitigating factors exist that can protect applications from this issue: - If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised. - If the JWK is specified with the 'use' parameter set to 'sig' (as expected for keys used only for signing/verification) an exception will be raised. - If the JWK is specified with the 'key_ops' parameter set and it does not include the 'decrypt' operation an exception will be raised. - Applications may check the token type before validation, in this case they would fail to detect an expected JWS

    Normally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK 'use' type.

    Due to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.

    Many thanks to Tom Tervoort of Secura for finding and reporting this issue.

    Show details on source website

    {
      "affected": [
        {
          "package": {
            "ecosystem": "PyPI",
            "name": "jwcrypto"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.4"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "aliases": [
        "CVE-2022-3102"
      ],
      "database_specific": {
        "cwe_ids": [],
        "github_reviewed": true,
        "github_reviewed_at": "2022-09-21T16:58:31Z",
        "nvd_published_at": null,
        "severity": "MODERATE"
      },
      "details": "The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token.\nQuoting the private disclosure we received : \"Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation.\"\nThis substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT.\nThe significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.\n\nSeveral mitigating factors exist that can protect applications from this issue:\n- If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised.\n- If the JWK is specified with the \u0027use\u0027 parameter set to \u0027sig\u0027 (as expected for keys used only for signing/verification) an exception will be raised.\n- If the JWK is specified with the \u0027key_ops\u0027 parameter set and it does not include the \u0027decrypt\u0027 operation an exception will be raised.\n- Applications may check the token type before validation, in this case they would fail to detect an expected JWS\n\nNormally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK \u0027use\u0027 type.\n\nDue to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.\n\nMany thanks to Tom Tervoort of Secura for finding and reporting this issue.\n",
      "id": "GHSA-gwp4-mcv4-w95j",
      "modified": "2022-09-21T16:58:31Z",
      "published": "2022-09-21T16:58:31Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/security/advisories/GHSA-gwp4-mcv4-w95j"
        },
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/commit/f4e912f83cb578e2cd47f8a9398bf15f680bf558"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/latchset/jwcrypto"
        },
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/releases/tag/v1.4.0"
        }
      ],
      "schema_version": "1.4.0",
      "severity": [],
      "summary": "jwcrypto token substitution can lead to authentication bypass"
    }

    GSD-2022-3102

    Vulnerability from gsd - Updated: 2023-12-13 01:19
    Details
    ** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.
    Aliases
    Aliases

    {
      "GSD": {
        "alias": "CVE-2022-3102",
        "id": "GSD-2022-3102",
        "references": [
          "https://security.archlinux.org/CVE-2022-3102",
          "https://www.suse.com/security/cve/CVE-2022-3102.html"
        ]
      },
      "gsd": {
        "metadata": {
          "exploitCode": "unknown",
          "remediation": "unknown",
          "reportConfidence": "confirmed",
          "type": "vulnerability"
        },
        "osvSchema": {
          "aliases": [
            "CVE-2022-3102"
          ],
          "id": "GSD-2022-3102",
          "modified": "2023-12-13T01:19:39.824948Z",
          "schema_version": "1.4.0"
        }
      },
      "namespaces": {
        "cve.org": {
          "CVE_data_meta": {
            "ASSIGNER": "cve@mitre.org",
            "ID": "CVE-2022-3102",
            "STATE": "RESERVED"
          },
          "data_format": "MITRE",
          "data_type": "CVE",
          "data_version": "4.0",
          "description": {
            "description_data": [
              {
                "lang": "eng",
                "value": "** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided."
              }
            ]
          }
        },
        "gitlab.com": {
          "advisories": [
            {
              "affected_range": "\u003c1.4",
              "affected_versions": "All versions before 1.4",
              "cwe_ids": [
                "CWE-1035",
                "CWE-937"
              ],
              "date": "2022-09-21",
              "description": "The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token.\nQuoting the private disclosure we received : \"Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation.\"\nThis substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT.\nThe significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.\n\nSeveral mitigating factors exist that can protect applications from this issue:\n- If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised.\n- If the JWK is specified with the \u0027use\u0027 parameter set to \u0027sig\u0027 (as expected for keys used only for signing/verification) an exception will be raised.\n- If the JWK is specified with the \u0027key_ops\u0027 parameter set and it does not include the \u0027decrypt\u0027 operation an exception will be raised.\n- Applications may check the token type before validation, in this case they would fail to detect an expected JWS\n\nNormally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK \u0027use\u0027 type.\n\nDue to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.\n\nMany thanks to Tom Tervoort of Secura for finding and reporting this issue.\n",
              "fixed_versions": [
                "1.4"
              ],
              "identifier": "GMS-2022-4401",
              "identifiers": [
                "GHSA-gwp4-mcv4-w95j",
                "GMS-2022-4401",
                "CVE-2022-3102"
              ],
              "not_impacted": "All versions starting from 1.4",
              "package_slug": "pypi/jwcrypto",
              "pubdate": "2022-09-21",
              "solution": "Upgrade to version 1.4 or above.",
              "title": "jwcrypto token substitution can lead to authentication bypass",
              "urls": [
                "https://github.com/latchset/jwcrypto/security/advisories/GHSA-gwp4-mcv4-w95j",
                "https://github.com/latchset/jwcrypto/commit/f4e912f83cb578e2cd47f8a9398bf15f680bf558",
                "https://github.com/latchset/jwcrypto/releases/tag/v1.4.0",
                "https://github.com/advisories/GHSA-gwp4-mcv4-w95j"
              ],
              "uuid": "49486a63-9fd3-4ebe-aac9-2ecd2c8f5a06"
            }
          ]
        }
      }
    }

    OESA-2024-2443 (CVE-2022-3102)

    Vulnerability from osv_openeuler – Published: 2024-11-22 11:07 – Updated: 2026-08-06 11:07 – Source website
    VLAI
    Summary
    python-jwcrypto security update
    Details

    Implements JWK, JWS, JWE specifications with python-cryptography

    Security Fix(es):

    VUL-0: CVE-2022-3102: python-jwcrypto: jwcrypto token substitution can lead to authentication bypass(CVE-2022-3102)

    JWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Prior to version 1.5.6, an attacker can cause a denial of service attack by passing in a malicious JWE Token with a high compression ratio. When the server processes this token, it will consume a lot of memory and processing time. Version 1.5.6 fixes this vulnerability by limiting the maximum token length.(CVE-2024-28102)


    {
      "affected": [
        {
          "ecosystem_specific": {
            "noarch": [
              "python3-jwcrypto-1.4.2-3.oe2203sp1.noarch.rpm"
            ],
            "src": [
              "python-jwcrypto-1.4.2-3.oe2203sp1.src.rpm"
            ]
          },
          "package": {
            "ecosystem": "openEuler:22.03-LTS-SP1",
            "name": "python-jwcrypto",
            "purl": "pkg:rpm/openEuler/python-jwcrypto\u0026distro=openEuler-22.03-LTS-SP1"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.4.2-3.oe2203sp1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "severity": "Medium"
      },
      "details": "Implements JWK, JWS, JWE specifications with python-cryptography\r\n\r\nSecurity Fix(es):\r\n\r\nVUL-0: CVE-2022-3102: python-jwcrypto: jwcrypto token substitution can lead to authentication bypass(CVE-2022-3102)\r\n\r\nJWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Prior to version 1.5.6, an attacker can cause a denial of service attack by passing in a malicious JWE Token with a high compression ratio. When the server processes this token, it will consume a lot of memory and processing time. Version 1.5.6 fixes this vulnerability by limiting the maximum token length.(CVE-2024-28102)",
      "id": "OESA-2024-2443",
      "modified": "2026-08-06T11:07:55Z",
      "published": "2024-11-22T11:07:55Z",
      "references": [
        {
          "type": "ADVISORY",
          "url": "https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2024-2443"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3102"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-28102"
        }
      ],
      "schema_version": "1.7.2",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "python-jwcrypto security update",
      "upstream": [
        "CVE-2022-3102",
        "CVE-2024-28102"
      ]
    }

    OPENSUSE-SU-2024:12528-1

    Vulnerability from csaf_opensuse - Published: 2024-06-15 00:00 - Updated: 2026-09-20 20:40
    Summary
    python310-jwcrypto-1.4.2-1.1 on GA media
    Severity
    Moderate
    Scope
    1 vulnerability in this advisory, including CVE-2022-3102.
    CVE-2022-3102
    Recommended: 12 products
    Open the full advisory

    OPENSUSE-SU-2025:15096-1

    Vulnerability from csaf_opensuse - Published: 2025-05-17 00:00 - Updated: 2026-09-20 21:32
    Summary
    python311-jwcrypto-1.5.6-2.5 on GA media
    Severity
    Moderate
    Scope
    1 vulnerability in this advisory, including CVE-2022-3102.
    CVE-2022-3102
    Recommended: 12 products
    Open the full advisory

    PYSEC-2026-827

    Vulnerability from pysec - Published: 2026-07-07 10:17 - Updated: 2026-07-07 11:30
    VLAI
    Details

    The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token. Quoting the private disclosure we received : "Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation." This substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT. The significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.

    Several mitigating factors exist that can protect applications from this issue: - If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised. - If the JWK is specified with the 'use' parameter set to 'sig' (as expected for keys used only for signing/verification) an exception will be raised. - If the JWK is specified with the 'key_ops' parameter set and it does not include the 'decrypt' operation an exception will be raised. - Applications may check the token type before validation, in this case they would fail to detect an expected JWS

    Normally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK 'use' type.

    Due to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.

    Many thanks to Tom Tervoort of Secura for finding and reporting this issue.

    Impacted products
    Name purl
    jwcrypto pkg:pypi/jwcrypto

    {
      "affected": [
        {
          "package": {
            "ecosystem": "PyPI",
            "name": "jwcrypto",
            "purl": "pkg:pypi/jwcrypto"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.4"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": [
            "0.2.0",
            "0.2.1",
            "0.3.0",
            "0.3.1",
            "0.4.0",
            "0.4.1",
            "0.4.2",
            "0.5.0",
            "0.6.0",
            "0.7",
            "0.8",
            "0.9",
            "0.9.1",
            "1.0",
            "1.2",
            "1.3",
            "1.3.1"
          ]
        }
      ],
      "aliases": [
        "CVE-2022-3102",
        "GHSA-gwp4-mcv4-w95j"
      ],
      "details": "The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token.\nQuoting the private disclosure we received : \"Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation.\"\nThis substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT.\nThe significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.\n\nSeveral mitigating factors exist that can protect applications from this issue:\n- If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised.\n- If the JWK is specified with the \u0027use\u0027 parameter set to \u0027sig\u0027 (as expected for keys used only for signing/verification) an exception will be raised.\n- If the JWK is specified with the \u0027key_ops\u0027 parameter set and it does not include the \u0027decrypt\u0027 operation an exception will be raised.\n- Applications may check the token type before validation, in this case they would fail to detect an expected JWS\n\nNormally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK \u0027use\u0027 type.\n\nDue to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.\n\nMany thanks to Tom Tervoort of Secura for finding and reporting this issue.\n",
      "id": "PYSEC-2026-827",
      "modified": "2026-07-07T11:30:38.627338Z",
      "published": "2026-07-07T10:17:22.132850Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/security/advisories/GHSA-gwp4-mcv4-w95j"
        },
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/commit/f4e912f83cb578e2cd47f8a9398bf15f680bf558"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/latchset/jwcrypto"
        },
        {
          "type": "WEB",
          "url": "https://github.com/latchset/jwcrypto/releases/tag/v1.4.0"
        },
        {
          "type": "PACKAGE",
          "url": "https://pypi.org/project/jwcrypto"
        },
        {
          "type": "ADVISORY",
          "url": "https://github.com/advisories/GHSA-gwp4-mcv4-w95j"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3102"
        }
      ],
      "summary": "jwcrypto token substitution can lead to authentication bypass"
    }