DEV Community

Raja Nagori
Raja Nagori

Posted on

Compromised packages: same name, new behavior, old trust

Trust is sticky. Version bumps can ship new exfil while APIs stay stable.

Problem

Same package name. Familiar API. New version. Hidden side effect on load or on a hot method. That is maintainer/release compromise - not a typo.

For top-N packages by import graph reach, require human approval on version bumps—even patch lines.

High Level Overview

Solution concept

Ship one control at a time, measure bypasses, then add the next. A single enforced check beats a binder of unenforced best practices.

  • Pin + human review for critical deps
  • Verify provenance attestations when available
  • Alert on novel egress from package code
  • Prefer smaller dependency surfaces for trust boundaries
  1. Users already depend on a trusted package name
  2. Maintainer account or release pipeline is abused
  3. New version preserves exports but adds a beacon path
  4. Consumers update routinely and inherit the behavior

Sequence Diagram

Field notes

High-reach libraries (HTTP clients, auth helpers, logging) deserve slower upgrade trains. A patch bump that adds network calls to unfamiliar hosts is a stronger signal than a CVSS score alone.

Residual risk

Authorized malicious publishes beat signature checks. Layer identity, behavior, and blast-radius reduction.

Try it - talk back

Explore the concept in Supply Chain Attack Simulator (SCAS):


If you face any issues - Github Issues - RAJANAGORI

Top comments (0)