Skip to content
RCE Write-up Advanced

Netflix Vulnerability: Dependency Confusion in Action

An internal Netflix npm package name was unclaimed on the public registry, so the researchers published a package with that name. When a Netflix developer or CI job installed dependencies, the package executed and sent a beacon, proving remote code execution.

RONI CARTA | LUPIN Follow

Published on depi.security

What if I told you that at 2 AM in a Tokyo Hotel Room, instead of watching Netflix we ended up uncovering a vulnerability on Netflix ? This discussion happened in September 2023, when I met up with Shubs, one of the best bug bounty hunters I’ve ever encountered and the co-founder of Assetnote.

RONI CARTA | LUPIN, on depi.security

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

The researchers achieved remote code execution on a Netflix developer machine or CI runner, which could lead to further compromise, though they only sent a minimal beacon and then disabled the package.

What the attacker needed

Unclaimed package name on public registry; victim installs dependencies from public registry

The fix

The text does not state the exact fix, but the vulnerability should be fixed by claiming the unclaimed package name on the public registry and configuring package managers to prioritise internal packages.

How it was found

  1. Collect HAR files from Netflix web assets using a headless browser.
  2. Parse JavaScript bundles with a Rust AST parser to extract candidate npm package names.
  3. Cross-reference names against public registries to find unclaimed ones.
  4. Publish a claiming package for the unclaimed name nf-cl-logger.
  5. Wait for a Netflix system to install the package and receive a beacon.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Dependency confusion happens when a company uses a private package with a certain name, but that name is not registered on the public package registry. An attacker can register the same name publicly, and if the company's build tools are configured to check the public registry first, they will download and run the attacker's package instead of the private one. This gives the attacker code execution on the company's build server or developer machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by RONI CARTA | LUPIN

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.