Skip to main content

Dependency Confusion

Description

The application incorrectly defines the dependencies to be used. This generates some ambiguity that can be used by an attacker to confuse the package manager in charge of installing or updating the project's dependencies, with the aim of executing potentially harmful code, thus increasing the possible attack vectors.

Impact

  • Execute malicious code in the application
  • Deploy a malicious version of the application that can lead to a system unavailability

Recommendation

  • Set the name of the organization that owns the private dependency in the package manager file.

  • Set the organization in both the private and public registry of the package manager.

Threat

Anonymous attacker from the Internet

Expected Remediation Time

⌚ minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the src.

Base

  • Attack vector: N
  • Attack complexity: L
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: L
  • Integrity: H
  • Availability: L

Temporal

  • Exploit code madurity: H
  • Remediation level: O
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L/E:H/RL:O/RC:C
  • Score:
    • Base: 7.6
    • Temporal: 7.3
  • Severity:
    • Base: High
    • Temporal: High

Requirements

Fixes

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.