CVE-2022-42966: Cleo Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-2p9h-ccw7-33gf
CVSS 5.9
CWE-1333
Published
Advisory Summary

CVE-2022-42966 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Cleo libraries in the PyPI ecosystem. The issue involves cleo is vulnerable to regular expression denial of service (redos). Remediation is available by upgrading affected packages to version 2.0.0.

CVE-2022-42966 at a Glance

CVE Identifier CVE-2022-42966
GHSA Identifier GHSA-2p9h-ccw7-33gf
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Cleo
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-42966

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

cleo fixed: 2.0.0
pip install cleo>=2.0.0
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 cleo

How to Check if You Are Affected

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

pip show cleo

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Cleo, 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

An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the cleo PyPI package, when an attacker is able to supply arbitrary input to the Table.set_rows method.

CVE-2022-42966 Affected Cleo Versions

1 component(s)
Fixed Versions:
2.0.0
Product / Package Ecosystem Affected Versions Fixed Version
cleo
PyPI
≥ 1.0.0a1
< 2.0.0
2.0.0

References

Frequently Asked Questions

What is CVE-2022-42966?
CVE-2022-42966 is a security vulnerability in Cleo involving cleo is vulnerable to Regular Expression Denial of Service (ReDoS) under CWE-1333: Inefficient Regular Expression Complexity.
Which Cleo versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: cleo.
What version fixes CVE-2022-42966?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cleo affected?
Yes, cleo is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What is the CVSS score of CVE-2022-42966?
CVE-2022-42966 has a CVSS v3.1 base score of 5.9 (MODERATE) 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-42966?
CVE-2022-42966 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check PyPI dependencies for CVE-2022-42966?
Run the dependency tree command: 'pip show cleo'. 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-2p9h-ccw7-33gf",
  "modified" : "2026-07-02T20:40:18Z",
  "published" : "2022-11-10T12:01:17Z",
  "aliases" : [ "CVE-2022-42966" ],
  "summary" : "cleo is vulnerable to Regular Expression Denial of Service (ReDoS)",
  "details" : "An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the cleo PyPI package, when an attacker is able to supply arbitrary input to the Table.set_rows method.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cleo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0a1"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-42966"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-poetry/cleo/pull/285"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-poetry/cleo/commit/b5b9a04d2caf58bf7cf94eb7ae4a1ebbe60ea455"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-2p9h-ccw7-33gf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/cleo/PYSEC-2022-43178.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-poetry/cleo"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-poetry/cleo/releases/tag/2.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://research.jfrog.com/vulnerabilities/cleo-redos-xray-257186"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-10T18:52:40Z",
    "nvd_published_at" : "2022-11-09T20:15:00Z"
  }
}