Bug 1670290

Summary: jenkins-plugin-groovy: Sandbox Bypass in Groovy Plugin (SECURITY-1293)
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: java-sig-commits, lkundrak, mizdebsk, msrb, pharvey
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-31 15:26:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1670291    
Bug Blocks: 1670285    

Description Sam Fowler 2019-01-29 07:37:25 UTC
Jenkins Groovy Plugin before version 2.1 has the following vulnerability:

Groovy Plugin has a form validation HTTP endpoint used to validate a user-submitted Groovy script through compilation, which was not subject to sandbox protection. This allowed attackers with Overall/Read access to execute arbitrary code on the Jenkins master by applying AST transforming annotations such as @Grab to source code elements.

The affected HTTP endpoint now applies a safe Groovy compiler configuration preventing the use of unsafe AST transforming annotations.


External Reference:

https://jenkins.io/security/advisory/2019-01-28/#SECURITY-1293

Upstream patches:

https://github.com/jenkinsci/groovy-plugin/commit/212e048a319ae32dad4cfec5e73a885a9f4781f0

Comment 1 Sam Fowler 2019-01-29 07:37:53 UTC
Created groovy-sandbox tracking bugs for this issue:

Affects: fedora-all [bug 1670291]

Comment 2 Paul Harvey 2019-01-31 15:26:13 UTC
This flaw is actually referring to a sandbox escape in https://plugins.jenkins.io/groovy aka https://github.com/jenkinsci/groovy-plugin; *not* groovy-sandbox aka https://github.com/jenkinsci/groovy-sandbox/

Removing openshift-enterprise-3.x.