<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sidhanta Palei</title>
    <description>The latest articles on DEV Community by Sidhanta Palei (@sidhanta_palei_b40572bcbd).</description>
    <link>https://dev.to/sidhanta_palei_b40572bcbd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3810020%2F4a12d32a-4242-4832-bb70-e1fcad85cbbd.jpg</url>
      <title>DEV Community: Sidhanta Palei</title>
      <link>https://dev.to/sidhanta_palei_b40572bcbd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sidhanta_palei_b40572bcbd"/>
    <language>en</language>
    <item>
      <title>Finding Dependency Confusion Vulnerabilities in Public GitHub Repositories</title>
      <dc:creator>Sidhanta Palei</dc:creator>
      <pubDate>Fri, 06 Mar 2026 16:03:00 +0000</pubDate>
      <link>https://dev.to/sidhanta_palei_b40572bcbd/detecting-dependency-confusion-vulnerabilities-in-github-repositories-18hm</link>
      <guid>https://dev.to/sidhanta_palei_b40572bcbd/detecting-dependency-confusion-vulnerabilities-in-github-repositories-18hm</guid>
      <description>&lt;p&gt;Supply chain attacks are becoming one of the most serious security risks in modern software development. Instead of attacking the application directly, attackers target the &lt;strong&gt;dependencies that the application relies on&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One attack technique that has gained a lot of attention in recent years is &lt;strong&gt;Dependency Confusion&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;While researching supply chain vulnerabilities during bug bounty programs, I repeatedly encountered repositories that referenced internal dependencies which did not exist on public registries. That observation eventually led me to build a small tool called &lt;strong&gt;PACO&lt;/strong&gt; to automate the process of identifying these risks.&lt;/p&gt;

&lt;p&gt;This article explains how dependency confusion works and how PACO can help detect these vulnerabilities while browsing GitHub repositories.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Dependency Confusion?
&lt;/h2&gt;

&lt;p&gt;Dependency confusion is a &lt;strong&gt;supply chain vulnerability&lt;/strong&gt; where an attacker publishes a malicious package using the same name as an internal dependency used by an organization.&lt;/p&gt;

&lt;p&gt;If the build system prefers packages from the public registry, it may install the attacker’s version instead of the intended internal package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8p49w6cjwy9m5qqndze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8p49w6cjwy9m5qqndze.png" alt="Dependency-confusion-comparison" width="555" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This type of attack can affect package ecosystems such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NPM&lt;/li&gt;
&lt;li&gt;PyPI&lt;/li&gt;
&lt;li&gt;RubyGems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the malicious package is installed, it can execute arbitrary code during installation or runtime.&lt;/p&gt;

&lt;p&gt;Possible impacts include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remote code execution&lt;/li&gt;
&lt;li&gt;Credential theft&lt;/li&gt;
&lt;li&gt;Data exfiltration&lt;/li&gt;
&lt;li&gt;CI/CD compromise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The attack became widely known after security researcher &lt;strong&gt;Alex Birsan demonstrated it against several major companies in 2021&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Since then, dependency confusion has become a common technique discussed in &lt;strong&gt;bug bounty and supply chain security research&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Manual Problem
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcxvrfkb9amanoh77rrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcxvrfkb9amanoh77rrz.png" alt="manualVSpaco" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When analyzing open-source repositories for dependency confusion risks, the usual workflow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a GitHub repository&lt;/li&gt;
&lt;li&gt;Identify dependency files such as &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;Gemfile&lt;/code&gt;, or &lt;code&gt;requirements.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Extract dependency names&lt;/li&gt;
&lt;li&gt;Check whether those packages exist on public registries&lt;/li&gt;
&lt;li&gt;Identify packages that appear to be unpublished&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Doing this manually works for one repository, but it becomes extremely slow when reviewing dozens of projects.&lt;/p&gt;

&lt;p&gt;To speed up this workflow, I decided to automate the process.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building PACO
&lt;/h2&gt;

&lt;p&gt;PACO (Package Confuser) is a lightweight &lt;strong&gt;Chrome extension designed to detect unpublished dependencies directly while browsing GitHub repositories&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of cloning repositories or running command-line tools, the extension allows security researchers and developers to analyze dependencies directly in the browser.&lt;/p&gt;

&lt;p&gt;The goal is simple: quickly identify dependencies that may create a &lt;strong&gt;dependency confusion risk&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What PACO Detects
&lt;/h2&gt;

&lt;p&gt;PACO scans dependency files in GitHub repositories and checks whether the referenced packages exist on official registries.&lt;/p&gt;

&lt;p&gt;It helps identify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unpublished packages&lt;/li&gt;
&lt;li&gt;Removed or broken dependencies&lt;/li&gt;
&lt;li&gt;Packages that could be abused for dependency confusion attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently supported ecosystems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NPM (Node.js)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PyPI (Python)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RubyGems (Ruby)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Support for additional ecosystems is planned in future releases.&lt;/p&gt;




&lt;h2&gt;
  
  
  How the Extension Works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7cfx019o28cv0c8zahl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7cfx019o28cv0c8zahl.png" alt="PACO" width="540" height="841"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The extension performs several steps when scanning a repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Detect dependency files
&lt;/h3&gt;

&lt;p&gt;PACO detects common dependency files used by different ecosystems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;package.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Gemfile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;requirements.txt&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Extract dependency names
&lt;/h3&gt;

&lt;p&gt;Each ecosystem requires a slightly different parsing approach.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON parsing for NPM dependencies&lt;/li&gt;
&lt;li&gt;Regex extraction for Ruby Gemfiles&lt;/li&gt;
&lt;li&gt;Line parsing for Python requirements&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Query official package registries
&lt;/h3&gt;

&lt;p&gt;After extracting dependency names, the extension queries the relevant registries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;registry.npmjs.org&lt;/li&gt;
&lt;li&gt;pypi.org&lt;/li&gt;
&lt;li&gt;rubygems.org&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a dependency cannot be found, PACO flags it as a &lt;strong&gt;potential dependency confusion candidate&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Example Scan
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frx4pm5afgliatd82mcoa.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frx4pm5afgliatd82mcoa.gif" alt="Demo-run" width="720" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A typical PACO scan might return results like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[NPM] dt-adoptionoverview-extension → Unpublished
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This indicates that the dependency referenced in the repository does not exist on the public NPM registry, which may indicate a potential supply chain risk.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try PACO
&lt;/h2&gt;

&lt;p&gt;If you are interested in supply chain security or bug bounty research, you can check out the project here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/r00tSid/PACO-Package-Confuser" rel="noopener noreferrer"&gt;https://github.com/r00tSid/PACO-Package-Confuser&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Real Bug Bounty Findings
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lxg5mk1vblm45nfr3ob.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lxg5mk1vblm45nfr3ob.jpeg" alt="Cloudflare" width="800" height="288"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqn5x1md7gkvnku21e700.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqn5x1md7gkvnku21e700.jpeg" alt="Microsoft" width="800" height="1208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During bug bounty research, PACO helped identify &lt;strong&gt;real dependency confusion exposures in public programs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some of these findings resulted in bug bounty rewards.&lt;/p&gt;

&lt;p&gt;These results highlight how &lt;strong&gt;supply chain issues can still exist in modern development environments&lt;/strong&gt;, even in large organizations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Browser-Based Scanning?
&lt;/h2&gt;

&lt;p&gt;Most dependency scanning tools operate as command-line utilities. While those tools are powerful, they usually require cloning repositories or running scripts locally.&lt;/p&gt;

&lt;p&gt;A browser-based approach makes it possible to analyze repositories instantly while reviewing code on GitHub.&lt;/p&gt;

&lt;p&gt;For security researchers who frequently browse repositories during reconnaissance, this workflow can be significantly faster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;p&gt;PACO is still evolving, and several improvements are planned.&lt;/p&gt;

&lt;p&gt;Possible future features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for additional ecosystems such as Go Modules, Maven, and Rust Cargo&lt;/li&gt;
&lt;li&gt;CLI version for automated scanning&lt;/li&gt;
&lt;li&gt;Organization-level repository scanning&lt;/li&gt;
&lt;li&gt;Integration with CI/CD pipelines&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Supply chain security has become a major concern for developers and organizations alike. Dependency confusion is just one example of how attackers can exploit weaknesses in package ecosystems.&lt;/p&gt;

&lt;p&gt;Identifying these risks early can help prevent serious security incidents.&lt;/p&gt;

&lt;p&gt;Tools like PACO are designed to make it easier for developers and security researchers to detect suspicious dependencies while reviewing code.&lt;/p&gt;

&lt;p&gt;If you find the project useful, consider giving it a star on GitHub.&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>bugbounty</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
