Skip to content
RCE Write-up Advanced

How a Single Vulnerability Exposed Millions!

A researcher found that a postinstall script in package.json could run a reverse shell in ToDesktop's build container, giving control of the build machine. Because many Electron apps relied on ToDesktop, this could let an attacker distribute malicious code through their auto-updaters.

medium.com

Published on medium.com

In the ever-evolving world of software security, vulnerabilities continue to emerge, affecting millions of users worldwide. A recent Hacker News discussion shed light on a major exploit that granted attackers the ability to execute arbitrary code on numerous popular applications.

DevD, on medium.com

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

Root cause

Likely the build container ran untrusted package install scripts with overly broad permissions, including access to signing and cloud credentials.

Impact

An attacker could take over the build machine and potentially push malicious updates to numerous apps, though the text does not show this actually happening.

What the attacker needed

Ability to add a postinstall script; build container with broad permissions

The fix

Build containers should be isolated with least privilege, dependencies minimised, and updates signed and verified rather than silently auto-applied.

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.

When developers build an app, their tools often run small setup scripts automatically. Here, one of those scripts could be abused to run an attacker's commands on the build computer. Since that computer creates the updates sent to users, the attacker could then push harmful updates to many apps.

What is RCE?

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

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.