Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. py
  4. ›
  5. CVE-2022-42969

CVE-2022-42969: ReDoS in py library when used with subversion

October 16, 2022 (updated October 21, 2024)

The 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.

The 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.

References

  • github.com/advisories/GHSA-w596-4wvx-j9j6
  • github.com/pypa/advisory-database/tree/main/vulns/py/PYSEC-2022-42969.yaml
  • github.com/pytest-dev/py
  • github.com/pytest-dev/py/blob/cb87a83960523a2367d0f19226a73aed4ce4291d/py/_path/svnurl.py
  • github.com/pytest-dev/py/issues/287
  • github.com/pytest-dev/py/issues/288
  • github.com/pytest-dev/pytest/issues/10392
  • news.ycombinator.com/item?id=34163710
  • nvd.nist.gov/vuln/detail/CVE-2022-42969
  • pypi.org/project/py

Code Behaviors & Features

Detect and mitigate CVE-2022-42969 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.11.0

Solution

Unfortunately, there is no solution available yet.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

pypi/py/CVE-2022-42969.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:45 +0000.