Skip to content
RCE Write-up Intermediate

From CVE to PoC: How I Used Claude Code to Create a Custom N-Day Exploit

The Langflow endpoint for building public flows accepted attacker-supplied flow data containing arbitrary Python code, which was passed to exec() without sandboxing. An unauthenticated attacker could achieve remote code execution on the server.

Will Giles | Cybersecurity Follow

Published on wgilescyber.medium.com

Most people in security have heard of zero-days. They get the headlines, the conference talks, and stress out the blue team.

Will Giles | Cybersecurity, on wgilescyber.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

The endpoint trusted attacker-controlled flow data instead of the stored flow from the database, and passed node definitions containing arbitrary Python to exec() without sandboxing.

Impact

An unauthenticated attacker could run arbitrary code on the server, and in the lab the resulting shell ran as root.

What the attacker needed

Network access to the Langflow instance; no authentication required

The fix

The issue was fixed in version 1.9.0.

How it was found

  1. Build the vulnerable Langflow version in a Docker container.
  2. Run the container, exposing the application on a local port.
  3. Launch Claude Code against the lab environment.
  4. Prompt the model with the advisory details and ask for a Python exploit using a reverse shell.
  5. Iterate on the generated script until the reverse shell connects.

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.

Langflow is a tool for building AI workflows. One of its web addresses was meant to let anyone build a public workflow, but it also accepted extra data from the visitor that could include Python code. The server ran that code without checking it, so anyone could run commands on the 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 Will Giles | Cybersecurity

View all

1 more disclosed report, 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.