PoetryApplication · Python Poetry

CVE-2022-36070

HIGH · 7.3 CVSS v3.1 Published 2022-09-07
Fix available
A fix is available. Upgrade to 1.1.9 or later.
See remediation →
73/100
Remediation priority · Elevated

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Poetry is a dependency manager for Python. To handle dependencies that come from a Git repository, Poetry executes various commands, e.g. `git config`. These commands are being executed using the executable’s name and not its absolute path. This can lead to the execution of untrusted code due to the way Windows resolves executable names to paths. Unlike Linux-based operating systems, Windows searches for the executable in the current directory first and looks in the paths that are defined in the `PATH` environment variable afterward. This vulnerability can lead to Arbitrary Code Execution, which would lead to the takeover of the system. If a developer is exploited, the attacker could steal credentials or persist their access. If the exploit happens on a server, the attackers could use their access to attack other internal systems. Since this vulnerability requires a fair amount of user interaction, it is not as dangerous as a remotely exploitable one. However, it still puts developers at risk when dealing with untrusted files in a way they think is safe. The victim could also not protect themself by vetting any Git or Poetry config files that might be present in the directory, because the behavior is undocumented. Versions 1.1.9 and 1.2.0b1 contain patches for this issue.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Poetry executes git commands using executable names instead of absolute paths. On Windows, this causes the OS to search the current working directory before PATH, allowing attackers to place a malicious executable (e.g., fake git.exe) in a directory where Poetry runs, resulting in arbitrary code execution.

MitigationUpgrade Poetry to version 1.2.0b1 or later (or 1.1.9+) which contains the patch to use absolute paths for git executables. Avoid running Poetry in directories with untrusted files.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
PoetryApplication
Affected:< 1.1.9= 1.2.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Poetry version installed
    Run 'poetry --version' or 'pip show poetry' to get the installed version number
    Affected if Version is less than 1.1.9 or exactly 1.2.0 (versions 1.2.0b1 and later are fixed)
  2. Confirm operating system is Windows
    Check if the system running Poetry is Windows (this vulnerability only affects Windows due to PATH search order behavior)
    Affected if Running on Windows - the vulnerability relies on Windows searching the current working directory before PATH for executables
  3. Check if Poetry project uses git dependencies
    Inspect project configuration files (pyproject.toml) for git-based dependencies, or run 'poetry show --tree' to see if any dependencies are fetched from git repositories
    Affected if Poetry is configured to fetch dependencies from git repositories - this triggers the vulnerable code path where git commands are executed
  4. Inspect current working directory for suspicious executables
    List executable files in the directory where Poetry runs (dir *.exe on Windows) to see if any unexpected git*.exe or other common executables exist
    Affected if Untrusted or unexpected executable files (especially git.exe, git.cmd, or similar) are present in the working directory where Poetry executes

You are affected if Poetry version is < 1.1.9 or = 1.2.0, you are running on Windows, and your project uses git-based dependencies, combined with untrusted files potentially present in the working directory.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.1.9 or later
Fixed in 1.1.9
Interim mitigation

Upgrade Poetry to version 1.2.0b1 or later (or 1.1.9+) which contains the patch to use absolute paths for git executables. Avoid running Poetry in directories with untrusted files.

Recommended fix High confidence

Poetry 1.1.9 or later (or the next stable release after 1.2.0)

  1. 1. Identify current Poetry version by running `poetry --version`
  2. 2. If running Poetry version < 1.1.9 on the 1.1.x line, upgrade by running: `pip install --upgrade poetry` or use the official installer for your OS
  3. 3. If running Poetry version 1.2.0, wait for the next stable patch release after 1.2.0, or use version 1.2.0b1 as a temporary workaround
  4. 4. Verify the upgrade was successful by running `poetry --version` and confirming the version is 1.1.9 or later
  5. 5. For projects with Git dependencies, ensure your Git installation is from a trusted source and verify no untrusted executables exist in project directories
Caveat Minor: Ensure your environment is compatible with Poetry 1.1.9+; some plugin compatibility may need verification

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Poetry Scoped from the published advisory
  • Consultation4.0 h
  • Implementation2.0 h
  • Testing4.0 h
  • Review / QA2.0 h
12.0 hours of engineering $2,120
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,392.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-36070 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-36070 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data