# CVE-2022-40898: pypa/wheel vulnerable to Regular Expression denial of service (ReDoS)

> Remote attackers can cause a denial of service in the Python Wheel library by providing malicious input to the command-line interface.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Dec 2022
- **Updated:** 15 Apr 2025
- **Also known as:** ALSA-2023:6712, AZL-12098, DEBIAN-CVE-2022-40898, GHSA-qwmp-2cf2-g9g6, MGASA-2023-0218, OESA-2023-1904, PYSEC-2022-43017, RHSA-2023:6712, RLSA-2023:6712, SUSE-SU-2023:0088-1, SUSE-SU-2023:0088-2, SUSE-SU-2023:0089-1, UBUNTU-CVE-2022-40898, USN-5821-1, USN-5821-2, USN-5821-3, openSUSE-SU-2024:12645-1, openSUSE-SU-2024:13214-1

## What is CVE-2022-40898?

CVE-2022-40898 is a high-severity denial of service vulnerability in n/a, published on 22 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlier allows remote attackers to cause a denial of service via attacker controlled input to wheel cli.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2022-40898?

3 open source packages ship an affected version, including wheel. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wheel` | PyPI | All versions | 0.38.1 |
| `wheel` | PyPI | All versions | 0.38.1 |
| `wheel` | PyPI | All versions | 0.38.1 |
| `python3-wheel` | AlmaLinux:9 | All versions | 1:0.36.2-8.el9 |
| `python3-wheel-wheel` | AlmaLinux:9 | All versions | 1:0.36.2-8.el9 |
| `python-wheel` | Red Hat:enterprise_linux:9::crb | All versions | 1:0.36.2-8.el9 |
| `python3-wheel` | Red Hat:enterprise_linux:9::crb | All versions | 1:0.36.2-8.el9 |
| `python3-wheel-wheel` | Red Hat:enterprise_linux:9::crb | All versions | 1:0.36.2-8.el9 |
| `python-wheel` | Rocky Linux:9 | All versions | 1:0.36.2-8.el9 |
| `python-wheel` | SUSE:Enterprise Storage 6 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Enterprise Storage 7 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Enterprise Storage 7.1 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 0.30.0-2.7.1 |
| `python-wheel` | SUSE:Linux Enterprise Module for Public Cloud 15 SP1 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Manager Proxy 4.2 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | SUSE:Manager Server 4.2 | All versions | 0.32.3-150100.6.5.1 |
| `python-wheel` | openSUSE:Leap 15.4 | All versions | 0.32.3-150100.6.5.1 |
| `python-ciscoconfparse` | openSUSE:Tumbleweed | All versions | 1.7.7-1.1 |

Products: Wheel Project Wheel.

## How do I fix CVE-2022-40898?

Upgrade wheel to 0.38.1 or later.

## Is CVE-2022-40898 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-40898 exists.

## Other vulnerabilities in n/a

- [CVE-2026-24049](https://insights.sbomify.com/CVE-2026-24049/): wheel Allows Arbitrary File Permission Modification via Path Traversal (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-40898 and fix it if it is affected.

What it is: CVE-2022-40898 is a high-severity denial of service vulnerability in n/a, published on 22 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-40898 exists.

Affected packages and fixed versions:
- wheel (PyPI): affected all versions; fixed in 0.38.1
- wheel (PyPI): affected all versions; fixed in 0.38.1
- wheel (PyPI): affected all versions; fixed in 0.38.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-40898/ (Markdown: https://insights.sbomify.com/CVE-2022-40898/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-40898
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-40898
- OSV: https://osv.dev/vulnerability/CVE-2022-40898

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-40898/
Summaries are generated and may contain mistakes; the official description above is the record.
