Security restrictions bypass in Script Security - CVE-2019-1003029

 

Security restrictions bypass in Script Security - CVE-2019-1003029

Published: March 7, 2019 / Updated: April 25, 2022


Vulnerability identifier: #VU17912
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:A/U:Green
CVE-ID: CVE-2019-1003029
CWE-ID: CWE-264
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild
Vendor: Jenkins
Affected software:
Script Security

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code on the vulnerable server.

The vulnerability exists due to an error  in "src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/groovy/GroovySandbox.java" and "src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/groovy/SecureGroovyScript.java" when parsing, compiling or instantiating a Groovy script. A remote attacker with Overall/Read permission can supply a specially crafted Groovy script, bypass the sandbox protection and execute arbitrary code on the Jenkins master.

The vulnerability can be exploited via an HTTP endpoint that provides script validation or via another plugin on the system.

Successful exploitation of the vulnerability may allow an attacker to compromise the affected server.


How to mitigate CVE-2019-1003029

Install update from vendor's website.

Sources