CVE-2022-42969: Withdrawn Advisory Denial of Service Vulnerability
HIGHCVE-2022-42969 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Withdrawn Advisory libraries in the PyPI ecosystem. The issue involves redos in py library when used with subversion. Remediation is available in the latest vendor maintenance releases.
CVE-2022-42969 at a Glance
Security Impact
CVSS: 7.5
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:H).
How to Fix CVE-2022-42969
To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install py>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show py
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-42969, inspect your installed packages using pip:
pip show py
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show py 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 Withdrawn Advisory, 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
CVE-2022-42969 Affected Withdrawn Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
py
|
PyPI |
≤ 1.11.0
|
|
References
Frequently Asked Questions
What is CVE-2022-42969?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2022-42969?
Is py affected?
What is the CVSS score of CVE-2022-42969?
What CWE is associated with CVE-2022-42969?
How can I check PyPI dependencies for CVE-2022-42969?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w596-4wvx-j9j6",
"modified" : "2026-05-29T20:49:54Z",
"published" : "2022-10-16T12:00:23Z",
"withdrawn" : "2025-08-01T20:34:11Z",
"aliases" : [ "CVE-2022-42969" ],
"summary" : "Withdrawn Advisory: ReDoS in py library when used with subversion ",
"details" : "### Withdrawn Advisory\nThis advisory has been withdrawn because evidence does not suggest that CVE-2022-42969 is a valid, reproducible vulnerability. This link is maintained to preserve external references.\n\n### Original Description\nThe py library through 1.11.0 for Python allows remote attackers to conduct a ReDoS (Regular expression Denial of Service) attack via a Subversion repository with crafted info data, because the InfoSvnCommand argument is mishandled.\n\nThe particular codepath in question is the regular expression at `py._path.svnurl.InfoSvnCommand.lspattern` and is only relevant when dealing with subversion (svn) projects. Notably the codepath is not used in the popular pytest project. The developers of the pytest package have released version `7.2.0` which removes their dependency on `py`. Users of `pytest` seeing alerts relating to this advisory may update to version `7.2.0` of `pytest` to resolve this issue. See https://github.com/pytest-dev/py/issues/287#issuecomment-1290407715 for additional context.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "py"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.11.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-42969"
}, {
"type" : "WEB",
"url" : "https://github.com/pytest-dev/py/issues/287"
}, {
"type" : "WEB",
"url" : "https://github.com/pytest-dev/py/issues/288"
}, {
"type" : "WEB",
"url" : "https://github.com/pytest-dev/pytest/issues/10392"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-w596-4wvx-j9j6"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/py/PYSEC-2022-42969.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/py/PYSEC-2022-43183.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pytest-dev/py"
}, {
"type" : "WEB",
"url" : "https://github.com/pytest-dev/py/blob/cb87a83960523a2367d0f19226a73aed4ce4291d/py/_path/svnurl.py#L316"
}, {
"type" : "WEB",
"url" : "https://news.ycombinator.com/item?id=34163710"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/py"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-18T18:03:13Z",
"nvd_published_at" : "2022-10-16T06:15:00Z"
}
}