MITRE Caldera Security Advisory — Remote Code Execution (CV
An unauthenticated endpoint that compiles agent binaries passed user-controlled linker flags to the Go linker, allowing an attacker to abuse gcc's -wrapper option to execute arbitrary commands. This could lead to remote code execution on the Caldera server.
Published on medium.com
All versions of MITRE Caldera (before commit 35bc06e and going back as far as the very first versions of Caldera) are vulnerable to a remote code execution (RCE) vulnerability that can be triggered in most default configurations. The only preconditions for this vulnerability to be exploitable are the presence of Go…
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 server passed user-controlled linker flags to the Go linker without sanitisation, and the linker's external linker invocation allowed abusing gcc's -wrapper option to run arbitrary commands.
Impact
An attacker could execute arbitrary commands on the Caldera server, leading to remote code execution.
What the attacker needed
Go, python, and gcc installed on server; Network access to the Caldera server
The fix
The vulnerability was fixed in commit 35bc06e and users should update to v5.1.0 or later.
How it was found
- Send a request to the unauthenticated agent compilation endpoint with crafted linker flags.
- The server compiles the agent using the provided flags.
- The Go linker invokes gcc with the -wrapper option, executing the attacker's command.
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.
The Caldera server builds small programs (agents) on demand and lets users choose some build options. One of those options was passed to a compiler in a way that let an attacker run their own commands on the server. This is called remote code execution because the attacker can run anything on the machine without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.