Jenkins Security Advisory 2019-01-08

This advisory announces vulnerabilities in the following Jenkins deliverables:

Descriptions

Sandbox Bypass in Script Security and Pipeline Plugins

SECURITY-1266 / CVE-2019-1003000 (Script Security), CVE-2019-1003001 (Pipeline: Groovy), CVE-2019-1003002 (Pipeline: Declarative)
Severity (CVSS): High
Affected plugins: script-security , workflow-cps , pipeline-model-definition
Description:

Script Security sandbox protection could be circumvented during the script compilation phase by applying AST transforming annotations such as @Grab to source code elements.

Both the pipeline validation REST APIs and actual script/pipeline execution are affected.

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

All known unsafe AST transformations in Groovy are now prohibited in sandboxed scripts.

Severity

Affected Versions

  • Pipeline: Declarative Plugin up to and including 1.3.4
  • Pipeline: Groovy Plugin up to and including 2.61
  • Script Security Plugin up to and including 1.49

Fix

  • Pipeline: Declarative Plugin should be updated to version 1.3.4.1
  • Pipeline: Groovy Plugin should be updated to version 2.61.1
  • Script Security Plugin should be updated to version 1.50

These versions include fixes to the vulnerabilities described above. All prior versions are considered to be affected by these vulnerabilities unless otherwise indicated.

Credit

The Jenkins project would like to thank the reporters for discovering and reporting these vulnerabilities:

  • Orange Tsai(@orange_8361) from DEVCORE for SECURITY-1266