Skip to content
RCE Write-up Advanced

Claude Code RCE: Exploiting Deeplink Handlers via Settings Injection

A deeplink handler in Claude Code could be abused to inject settings that led to remote code execution. An attacker who could get a victim to open a crafted deeplink could run code on the victim's machine.

0day.click

Published on 0day.click

What I found was a very entertaining vulnerability which is now fixed since Claude Code version 2.1.118.

The author, on 0day.click

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 deeplink handler accepted settings values from the link without validating them, letting an attacker control configuration that influences code execution.

Impact

An attacker could achieve remote code execution on a victim's machine if the victim opened a crafted deeplink; the issue was fixed in version 2.1.118.

What the attacker needed

Victim opens a crafted deeplink

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.

A deeplink is a special link that opens an app and passes it instructions, like a shortcut. The app trusted those instructions too much and let them change its settings, which could make it run harmful commands on the computer.

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.