Use a patch diff to map a sandbox exploit path

A researcher had Claude Code study a PaperCut NG fix, rebuild the flaw chain in a lab, and reach working code execution.

Done with Claude Code· Advanced· Aug 2026

What they did
Kev Breen put Claude Opus in Claude Code to work on a fresh PaperCut NG security issue, asking it to stand up a test VM and compare the patched release with the previous one. Inside an isolated root-run code-server setup, the agent used Ghidra/ilspy, semgrep, Playwright, and Proxmox to unpack jars, follow indicators of compromise, and tie together an auth bypass with SQL injection. It then operated the admin UI through Playwright and repeatedly adjusted proof-of-concept scripts until the chain behaved as expected.
How it went
About 90 minutes in, it had a working unauthenticated RCE sequence built from auth bypass, SQLi, arbitrary file write, and code execution. It later identified a third bypass that also got past the emergency patch. The overall session lasted about two hours and used 10 prompts, 293 tool calls, and 224M tokens; one early attempt went nowhere, and the researcher had to catch a mistaken claim that the exploit was already validated.
Tips
Run this kind of work only in a disposable lab and insist on evidence for each jump in reasoning. Build in a manual approval pause before any step that would submit, delete, send, or modify anything outside the test box.

Try it yourself with Claude Code

You are working only inside [isolated lab / test VM] on [product/version]. Examine [patch file, diff, or updated binaries] for [software name], inspect the affected components, and compare old versus new behavior to determine what security issue the change addresses. Then create a proof of concept that demonstrates the issue only in the lab, and stop for my approval before any irreversible action such as submitting, deleting, sending, or writing to a real system. If your first path fails, explain the dead end, move to the next plausible lead, and give short updates with evidence for each step.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.