Bug 1684556 (CVE-2019-1003024) - CVE-2019-1003024 jenkins-plugin-script-security: Sandbox Bypass in Script Security Plugin (SECURITY-1320)
Summary: CVE-2019-1003024 jenkins-plugin-script-security: Sandbox Bypass in Script Sec...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-1003024
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1684557 1685373 1685374
Blocks: 1684561
TreeView+ depends on / blocked
 
Reported: 2019-03-01 14:26 UTC by Andrej Nemec
Modified: 2021-02-16 22:18 UTC (History)
22 users (show)

Fixed In Version: jenkins-plugin-script-security 1.53
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Jenkins script security sandbox. The previously implemented script security sandbox protections prohibiting the use of unsafe AST transforming annotations such as @Grab could be circumvented through use of various Groovy language features including the use of AnnotationCollector, import aliasing, and referencing annotation types using their full class name. This allows users with Overall/Read permission, or the ability to control Jenkinsfile or sandboxed Pipeline shared library contents in SCM, to bypass the sandbox protection and execute arbitrary code on the Jenkins master. The highest threat from this vulnerability is to data confidentiality and integrity and system availability.
Clone Of:
Environment:
Last Closed: 2019-06-10 10:49:51 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0739 0 None None None 2019-04-10 18:34:13 UTC

Description Andrej Nemec 2019-03-01 14:26:48 UTC
The previously implemented script security sandbox protections prohibiting the use of unsafe AST transforming annotations such as @Grab (2019-01-08 fix for SECURITY-1266) could be circumvented through use of various Groovy language features:

* Use of AnnotationCollector
* Import aliasing
* Referencing annotation types using their full class name

This allowed users with Overall/Read permission, or the ability to control Jenkinsfile or sandboxed Pipeline shared library contents in SCM, to bypass the sandbox protection and execute arbitrary code on the Jenkins master.

Using AnnotationCollector is now newly prohibited in sandboxed scripts such as Pipelines. Importing any of the annotations considered unsafe will now result in an error. During the compilation phase, both simple and full class names of prohibited annotations are rejected for element annotations.

Comment 1 Andrej Nemec 2019-03-01 14:26:50 UTC
External References:

https://jenkins.io/security/advisory/2019-02-19/#SECURITY-1320

Comment 2 Andrej Nemec 2019-03-01 14:27:16 UTC
Created jenkins-script-security-plugin tracking bugs for this issue:

Affects: fedora-all [bug 1684557]

Comment 3 Sam Fowler 2019-03-04 03:22:23 UTC
Upstream Patch:

https://github.com/jenkinsci/script-security-plugin/commit/3228c88e

Comment 5 Sam Fowler 2019-03-22 01:41:29 UTC
Statement:

This flaw affects the jenkins-2-plugins RPM which is installed in the openshift3/jenkins-2-rhel7 container image. Security updates for this image are only released for versions 3.11 and 4.x of OpenShift Container Platform. The 3.11 version of the openshift3/jenkins-2-rhel7 container image is supported for use with previous versions of OpenShift Container Platform up to 3.4. For more information, refer to the OpenShift Jenkins README:

https://github.com/openshift/jenkins/blob/master/README.md#jenkins-security-advisories-the-master-image-from-this-repository-and-the-oc-binary

Comment 6 errata-xmlrpc 2019-04-10 18:34:12 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 3.11

Via RHSA-2019:0739 https://access.redhat.com/errata/RHSA-2019:0739


Note You need to log in before you can comment on or make changes to this bug.