CVE-2022-39280: Dparse Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-8fg9-p83m-x5pq
CVSS 5.9
CWE-400 CWE-1333
Published
Advisory Summary

CVE-2022-39280 is a HIGH (CVSS 5.9) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Dparse libraries in the PyPI ecosystem. The issue involves redos issue in dparse. Remediation is available by upgrading affected packages to version 0.5.2.

CVE-2022-39280 at a Glance

CVE Identifier CVE-2022-39280
GHSA Identifier GHSA-8fg9-p83m-x5pq
Severity HIGH
CVSS v3.1 Base Score 5.9
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Dparse
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2022-39280

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

dparse fixed: 0.5.2
pip install dparse>=0.5.2
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 dparse

How to Check if You Are Affected

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

pip show dparse

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

Note: The pip show dparse 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 Dparse, 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 dparse versions prior to 0.5.1 contain a regular expression that is vulnerable to [ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) (Regular Expression Denial of Service). All users parsing index server URLs with dparse are impacted by this vulnerability. ### Patches The Patch is applied in the `0.5.2` version, all users are recommended to upgrade as soon as possible. ### Workarounds Avoid passing index server URLs in the source file to be parsed. ### References [https://github.com/pyupio/dparse/tree/security/remove-intensive-regex](https://github.com/pyupio/dparse/tree/security/remove-intensive-regex) ### For more information If you have any questions or comments about this advisory: * Email us at [support@pyup.io](mailto:support@pyup.io)

CVE-2022-39280 Affected Dparse Versions

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

References

Frequently Asked Questions

What is CVE-2022-39280?
CVE-2022-39280 is a security vulnerability in Dparse involving ReDoS issue in dparse under CWE-400: Uncontrolled Resource Consumption.
Which Dparse versions are affected?
Affected versions include releases prior to 0.5.2 across affected packages: dparse.
What version fixes CVE-2022-39280?
Upgrading to 0.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dparse affected?
Yes, dparse is affected in releases prior to 0.5.2. Upgrade your dependency to 0.5.2 or later.
What is the CVSS score of CVE-2022-39280?
CVE-2022-39280 has a CVSS v3.1 base score of 5.9 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-39280?
CVE-2022-39280 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-2022-39280?
Run the dependency tree command: 'pip show dparse'. 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-8fg9-p83m-x5pq",
  "modified" : "2024-11-18T16:26:27Z",
  "published" : "2022-09-27T15:28:00Z",
  "aliases" : [ "CVE-2022-39280" ],
  "summary" : "ReDoS issue in dparse",
  "details" : "### Impact\ndparse versions prior to 0.5.1 contain a regular expression that is vulnerable to [ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) (Regular Expression Denial of Service).\n\nAll users parsing index server URLs with dparse are impacted by this vulnerability.\n\n### Patches\nThe Patch is applied in the `0.5.2` version, all users are recommended to upgrade as soon as possible.\n\n### Workarounds\nAvoid passing index server URLs in the source file to be parsed.\n\n### References\n[https://github.com/pyupio/dparse/tree/security/remove-intensive-regex](https://github.com/pyupio/dparse/tree/security/remove-intensive-regex)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [support@pyup.io](mailto:support@pyup.io)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "dparse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pyupio/dparse/security/advisories/GHSA-8fg9-p83m-x5pq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39280"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyupio/dparse/commit/8c990170bbd6c0cf212f1151e9025486556062d5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyupio/dparse/commit/d87364f9db9ab916451b1b036cfeb039e726e614"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/dparse/PYSEC-2022-301.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyupio/dparse"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-27T15:28:00Z",
    "nvd_published_at" : "2022-10-06T18:16:00Z"
  }
}