CVE-2021-24105

High
|8.4
No Exploit

Plain English Summary

AI-powered analysis for quick understanding

This vulnerability allows an attacker to insert malicious code into a package manager's repository, which can then be downloaded and executed on developers' machines or during software builds, potentially leading to unauthorized access or control over systems. It primarily affects environments where package managers are improperly configured, allowing the attacker to exploit the system by tricking it into using the malicious package instead of a legitimate one.

Technical Description

<p>Depending on configuration of various package managers it is possible for an attacker to insert a malicious package into a package manager's repository which can be retrieved and used during development, build, and release processes. This insertion could lead to remote code execution. We believe this vulnerability affects multiple package managers across multiple languages, including but not limited to: Python/pip, .NET/NuGet, Java/Maven, JavaScript/npm.</p> <p><strong>Attack scenarios</strong></p> <p>An attacker could take advantage of this ecosystem-wide issue to cause harm in a variety of ways. The original attack scenarios were discovered by Alex Birsan and are detailed in their whitepaper, <a href="https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610">Dependency Confusion: How I Hacked Into Apple, Microsoft and Dozens of Other Companies</a>.</p> <ul> <li><p>With basic knowledge of the target ecosystems, an attacker could create an empty shell for a package and insert malicious code in the install scripts, give it a high version, and publish it to the public repository. Vulnerable victim machines will download the higher version of the package between the public and private repositories and attempt to install it. Due to code incompatibility it will probably error out upon import or upon compilation, making it easier to detect; however the attacker would have gained code execution by that point.</p> </li> <li><p>An advanced attacker with some inside knowledge of the target could take a copy of a working package, insert the malicious code (in the package itself or in the install), and then publish it to a public repository. The package will likely install and import correctly, granting the attacker an initial foothold and persistence.</p> </li> </ul> <p>These two methods could affect target organizations at any of these various levels:</p> <ul> <li>Developer machines</li> <li>An entire team if the configuration to import the malicious package is uploaded to a code repository</li> <li>Continuous integration pipelines if they pull the malicious packages during the build, test, and/or deploy stages</li> <li>Customers, download servers, production services if the malicious code has not been detected</li> </ul> <p>This remote code execution vulnerability can only be addressed by reconfiguring installation tools and workflows, and not by correcting anything in the package repositories themselves. See the <strong>FAQ</strong> section of this CVE for configuration guidance.</p>

CVSS Vector Analysis

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
Confidentiality ImpactHigh
Integrity ImpactHigh
Availability ImpactHigh
ScopeUnchanged

Vector String

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

Exploit Resources

Search for proof-of-concept code and exploit modules

Official References

Est. Bounty
$3,947($1K-$5K)
Vendor Response
Grade FPatched in 1824 days

Quick Information

Published

Feb 25, 2021

about 5 years ago

Last Modified

Feb 24, 2026

about 1 month ago

Vendor

microsoft

Product

package manager configurations

Related Vulnerabilities

CVE-2023-36419High

This vulnerability allows an attacker to gain elevated privileges on Azure HDInsight by exploiting the Apache Oozie Workflow Scheduler, potentially letting them access sensitive data or execute unauthorized actions. To take advantage of this flaw, the attacker must have the ability to submit malicious XML data to the system.

CVE-2023-38156High

This vulnerability allows an attacker to gain elevated privileges within Azure HDInsight by exploiting a flaw in the Apache Ambari JDBC interface. To take advantage of this, the attacker must have access to the Ambari server, which typically requires some level of authentication or network access.

CVE-2023-38188Medium

This vulnerability allows an attacker to impersonate a legitimate user in Azure HDInsight, potentially gaining unauthorized access to sensitive data or resources. To exploit this flaw, the attacker must be able to send specially crafted requests to the system, which requires some level of access to the network where HDInsight is deployed.

CVE-2023-36881Medium

This vulnerability allows an attacker to impersonate a legitimate user in Azure HDInsight, potentially gaining unauthorized access to sensitive data and resources. To exploit this, the attacker must already have access to the network where the Azure service is running.

CVE-2023-36877Medium

This vulnerability allows an attacker to impersonate a legitimate user in Azure HDInsight's Apache Oozie service, potentially leading to unauthorized access to sensitive data or operations. To exploit this, the attacker must have network access to the affected service and be able to send specially crafted requests.