Skip to content
RCE Write-up Advanced

Jenkins – Groovy Sandbox breakout (SECURITY-1538 / CVE-2019-10393, CVE-2019-10394, CVE-2019-10399, CVE-2019-10400)

The Groovy Sandbox used by Jenkins' script-security plugin failed to apply security checks to certain AST nodes, allowing a sandbox breakout. An attacker could execute arbitrary code in build scripts, escaping the sandbox restrictions.

insinuator.net

Published on insinuator.net

Recently, I discovered a sandbox breakout in the Groovy Sandbox used by the Jenkins script-security Plugin in their Pipeline Plugin for build scripts. We responsibly disclosed this vulnerability and in the current version of Jenkins it has been fixed and the according Jenkins Security Advisory 2019-09-12 has been…

The author, on insinuator.net

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 sandbox's AST transformation did not cover all node types, leaving some unchecked and allowing a bypass.

Impact

An attacker could break out of the sandbox and execute arbitrary code, though the text does not specify the exact level of access gained.

What the attacker needed

Ability to run Jenkins Pipeline scripts

The fix

The vulnerability was fixed in the current version of Jenkins, as stated in the security advisory.

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.

Jenkins is a tool that runs build scripts, and it uses a 'sandbox' to stop those scripts from doing dangerous things. The sandbox works by checking parts of the script before running them, but it missed some parts, so a malicious script could get around the checks and run harmful code.

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.