Improper Input Validation Affecting unearth package, versions [,0.11.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.06% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-UNEARTH-6026479
  • published22 Oct 2023
  • disclosed20 Oct 2023
  • creditwayphinder

Introduced: 20 Oct 2023

CVE-2023-45805  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade unearth to version 0.11.2 or higher.

Overview

unearth is an A utility to fetch and download python packages

Affected versions of this package are vulnerable to Improper Input Validation through the pdm.lock file. An attacker can manipulate the dependency management system to install malicious packages by crafting a malicious pdm.lock file. This can lead to arbitrary code execution on install or downgrade attacks by only changing the version.

This is only exploitable if the version is parseable as a version and the filename is a prefix of the project name.

PoC

Example pdm.lock snippet to appear to depend on foo but actually install foo-2.


"foo 2.2.0" = [
  url = "https://files.pythonhosted.org/.../foo-2-2.tar.gz
]

CVSS Scores

version 3.1