CVE-2021-3840: Antilles tools Antilles Dependency Confusion Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-hgc3-hp6x-wpgx
CVSS 8.8
CWE-427
Published
Advisory Summary

CVE-2021-3840 is a HIGH (CVSS 8.8) antilles dependency confusion vulnerability vulnerability (CWE-427: Uncontrolled Search Path Element) affecting Antilles tools libraries in the PyPI ecosystem. The issue involves antilles dependency confusion vulnerability. Remediation is available by upgrading affected packages to version 1.0.1.

CVE-2021-3840 at a Glance

CVE Identifier CVE-2021-3840
GHSA Identifier GHSA-hgc3-hp6x-wpgx
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-427: Uncontrolled Search Path Element
Affected Product Antilles tools
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-3840

To remediate this vulnerability, upgrade all affected Antilles tools dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

antilles-tools fixed: 1.0.1
pip install antilles-tools>=1.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show antilles-tools

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-3840, inspect your installed packages using pip:

pip show antilles-tools

Analyze the terminal output to locate any version of Antilles tools in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.

Note: The pip show antilles-tools command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-427: Uncontrolled Search Path Element, where the product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors. In Antilles tools, 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

### Potential Impact: Remote code execution. ### Scope of Impact: Open-source project specific. ### Summary Description: A dependency confusion vulnerability was reported in the Antilles open-source software prior to version 1.0.1 that could allow for remote code execution during installation due to a package listed in requirements.txt not existing in the public package index (PyPi). MITRE classifies this weakness as an Uncontrolled Search Path Element (CWE-427) in which a private package dependency may be replaced by an unauthorized package of the same name published to a well-known public repository such as PyPi. The configuration has been updated to only install components built by Antilles, removing all other public package indexes. Additionally, the antilles-tools dependency has been published to PyPi. ### Mitigation Strategy for Customers (what you should do to protect yourself): Remove previous versions of Antilles as a precautionary measure and Update to version 1.0.1 or later. ### Acknowledgement: The Antilles team thanks Kotko Vladyslav for reporting this issue. ### References: https://github.com/lenovo/Antilles/commit/c7b9c5740908b343aceefe69733d9972e64df0b9

CVE-2021-3840 Affected Antilles tools Versions

1 component(s)
Fixed Versions:
1.0.1
Product / Package Ecosystem Affected Versions Fixed Version
antilles-tools
PyPI
< 1.0.1
1.0.1

References

Frequently Asked Questions

What is CVE-2021-3840?
CVE-2021-3840 is a security vulnerability in Antilles tools involving Antilles Dependency Confusion Vulnerability under CWE-427: Uncontrolled Search Path Element.
Which Antilles tools versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: antilles-tools.
What version fixes CVE-2021-3840?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is antilles-tools affected?
Yes, antilles-tools is affected in releases prior to 1.0.1. Upgrade your dependency to 1.0.1 or later.
What is the CVSS score of CVE-2021-3840?
CVE-2021-3840 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-3840?
CVE-2021-3840 is classified under CWE-427: Uncontrolled Search Path Element (The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.).
How can I check PyPI dependencies for CVE-2021-3840?
Run the dependency tree command: 'pip show antilles-tools'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hgc3-hp6x-wpgx",
  "modified" : "2024-09-04T20:58:13Z",
  "published" : "2021-11-03T17:36:22Z",
  "aliases" : [ "CVE-2021-3840" ],
  "summary" : "Antilles Dependency Confusion Vulnerability",
  "details" : "### Potential Impact: \nRemote code execution.\n\n### Scope of Impact: \nOpen-source project specific.\n\n### Summary Description:\nA dependency confusion vulnerability was reported in the Antilles open-source software prior to version 1.0.1 that could allow for remote code execution during installation due to a package listed in requirements.txt not existing in the public package index (PyPi). \nMITRE classifies this weakness as an Uncontrolled Search Path Element (CWE-427) in which a private package dependency may be replaced by an unauthorized package of the same name published to a well-known public repository such as PyPi.\nThe configuration has been updated to only install components built by Antilles, removing all other public package indexes. Additionally, the antilles-tools dependency has been published to PyPi.\n\n### Mitigation Strategy for Customers (what you should do to protect yourself):\nRemove previous versions of Antilles as a precautionary measure and Update to version 1.0.1 or later.\n\n### Acknowledgement:\nThe Antilles team thanks Kotko Vladyslav for reporting this issue.\n\n### References:\nhttps://github.com/lenovo/Antilles/commit/c7b9c5740908b343aceefe69733d9972e64df0b9\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "antilles-tools"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lenovo/Antilles/security/advisories/GHSA-hgc3-hp6x-wpgx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3840"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lenovo/Antilles/commit/c7b9c5740908b343aceefe69733d9972e64df0b9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lenovo/Antilles"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/antilles-tools/PYSEC-2021-840.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-427" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-03T15:04:04Z",
    "nvd_published_at" : "2021-11-12T22:15:00Z"
  }
}