Discovering Negative-Days with LLM Workflows
A GitHub Action using an LLM to analyse commits for security patches flagged a commit in a canary release of @next/codemod that replaced execSync with execa, indicating a command injection vulnerability. An attacker could exploit this by cloning a malicious repository and running the codemod, causing arbitrary command execution.
spaceraccoon.dev
Published on spaceraccoon.dev
By now, you’ve probably read Anthropic’s zero-days blogpost where an “out-of-the-box” Claude Opus 4.6 workflow was used to find 500 vulnerabilities in open-source projects. While I think this is a logical application of LLMs (see my keynote at the recent Association for the Advancement of Artificial Intelligence…
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 code used execSync with string interpolation to run git commands, allowing shell metacharacters in input to be interpreted as commands.
Impact
An attacker could execute arbitrary commands on a victim's machine if the victim runs the codemod on a malicious repository.
What the attacker needed
Victim runs the codemod on a malicious repository
The fix
The fix replaced execSync with execa, passing arguments as an array to avoid shell interpretation.
How it was found
- Create a trojanised repository with a package.json containing a malicious devDependency value.
- Run the codemod command on the cloned repository.
- The command injection triggers and creates a file on the device.
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.
This is about a tool that automatically scans code changes for security fixes. It found a change where a command was run in a way that could let an attacker run their own commands if they controlled part of the input. The author then confirmed the issue by creating a malicious repository and running the tool, which executed a command.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.