CVE-2023-6681: Jwcrypto Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-cw2r-4p82-qv79
CVSS 5.3
CWE-400
Published
Advisory Summary

CVE-2023-6681 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Jwcrypto libraries in the PyPI ecosystem. The issue involves dos with algorithms that use pbkdf2 due to unbounded pbes2 count value. Remediation is available by upgrading affected packages to version 1.5.1.

CVE-2023-6681 at a Glance

CVE Identifier CVE-2023-6681
GHSA Identifier GHSA-cw2r-4p82-qv79
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Jwcrypto
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2023-6681

To remediate this vulnerability, upgrade all affected Jwcrypto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jwcrypto fixed: 1.5.1
pip install jwcrypto>=1.5.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show jwcrypto

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-6681, inspect your installed packages using pip:

pip show jwcrypto

Analyze the terminal output to locate any version of Jwcrypto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.1), your application is affected.

Note: The pip show jwcrypto command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Jwcrypto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Denial of Service, Applications that allow the use of the PBKDF2 algorithm. ### Patches A [patch](https://github.com/latchset/jwcrypto/commit/d2655d370586cb830e49acfb450f87598da60be8) is available that sets the maximum number of default rounds. ### Workarounds Applications that do not need to use PBKDF2 should simply specify the algorithms use and exclude it from the list. Applications that need to use the algorithm should upgrade to the new version that allows to set a maximum rounds number. ### Acknowledgement The issues was reported by Jingcheng Yang and Jianjun Chen from Sichuan University and Zhongguancun Lab

CVE-2023-6681 Affected Jwcrypto Versions

1 component(s)
Fixed Versions:
1.5.1
Product / Package Ecosystem Affected Versions Fixed Version
jwcrypto
PyPI
< 1.5.1
1.5.1

References

Frequently Asked Questions

What is CVE-2023-6681?
CVE-2023-6681 is a security vulnerability in Jwcrypto involving DoS with algorithms that use PBKDF2 due to unbounded PBES2 Count value under CWE-400: Uncontrolled Resource Consumption.
Which Jwcrypto versions are affected?
Affected versions include releases prior to 1.5.1 across affected packages: jwcrypto.
What version fixes CVE-2023-6681?
Upgrading to 1.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jwcrypto affected?
Yes, jwcrypto is affected in releases prior to 1.5.1. Upgrade your dependency to 1.5.1 or later.
What is the CVSS score of CVE-2023-6681?
CVE-2023-6681 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2023-6681?
CVE-2023-6681 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2023-6681?
Run the dependency tree command: 'pip show jwcrypto'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cw2r-4p82-qv79",
  "modified" : "2024-11-12T18:30:50Z",
  "published" : "2023-12-28T16:36:59Z",
  "aliases" : [ "CVE-2023-6681" ],
  "summary" : "DoS with algorithms that use PBKDF2 due to unbounded PBES2 Count value",
  "details" : "### Impact\nDenial of Service,\nApplications that allow the use of the PBKDF2 algorithm.\n\n### Patches\nA [patch](https://github.com/latchset/jwcrypto/commit/d2655d370586cb830e49acfb450f87598da60be8) is available that sets the maximum number of default rounds.\n\n### Workarounds\nApplications that do not need to use PBKDF2 should simply specify the algorithms use and exclude it from the list.\nApplications that need to use the algorithm should upgrade to the new version that allows to set a maximum rounds number.\n\n### Acknowledgement\nThe issues was reported by Jingcheng Yang and Jianjun Chen from Sichuan University\nand Zhongguancun Lab\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jwcrypto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/latchset/jwcrypto/security/advisories/GHSA-cw2r-4p82-qv79"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-6681"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/latchset/jwcrypto/commit/d2655d370586cb830e49acfb450f87598da60be8"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:3267"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:9281"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2023-6681"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2260843"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/latchset/jwcrypto"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jwcrypto/PYSEC-2024-104.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-28T16:36:59Z",
    "nvd_published_at" : "2024-02-12T14:15:08Z"
  }
}