Security Advisories » Jenkins Security Advisory 2019-09-12
This advisory announces vulnerabilities in the following Jenkins deliverables:
Git client Plugin accepts user-specified values as argument to an invocation of
git ls-remote to validate the existence of a Git repository at the specified URL.
This was implemented in a way that allowed attackers with Job/Configure permission to execute an arbitrary system command on the Jenkins master as the OS user that the Jenkins process is running as.
Git client Plugin now rejects repository URLs that do not appear to be valid URLs.
Additionally, for versions of Git that support it, the repository URL argument is separated from option arguments using the
-- separator to prevent interpretation as an option.
As of publication of this advisory, no update for users of prerelease versions of 3.x such as 3.0.0-rc is available. Users of Git client Plugin 3.0.0-rc are advised to downgrade to 2.8.5 (and downgrade Git Plugin from 4.0.0-rc to the latest 3.x release to resolve dependency problems).
Sandbox protection in Script Security Plugin could be circumvented through any of the following:
Crafted method names in method call expressions (CVE-2019-10393)
Crafted property names in property expressions on the left-hand side of assignment expressions (CVE-2019-10394)
Crafted property names in property expressions in increment and decrement expressions (CVE-2019-10399)
Crafted subexpressions in increment and decrement expressions not involving actual assignment (CVE-2019-10400)
This allowed attackers able to specify and run sandboxed scripts to execute arbitrary code in the context of the Jenkins master JVM.
These expressions are now subject to sandbox protection.
Build Environment Plugin did not escape values of environment variables shown on its views. This resulted in a cross-site scripting vulnerability exploitable by attackers able to control the values of build environment variables, typically users with Job/Configure or Job/Build permission.
Jenkins applies the missing escaping by default since 2.146 and LTS 2.138.2, so newer Jenkins releases are not affected by this vulnerability.
Build Environment Plugin now escapes all variables displayed in its views.
Dashboard View Plugin did not escape the build description on the Latest Builds View. This resulted in a cross-site scripting vulnerability exploitable by attackers able to control the description of builds shown on that view.
Dashboard View Plugin now applies the configured markup formatter to the build description, rendering it as it appears elsewhere in Jenkins.
Aqua Security Serverless Scanner Plugin stores service passwords in job configurations.
While the password is stored encrypted on disk, it was transmitted in plain text as part of the configuration form. This could result in exposure of the password through browser extensions, cross-site scripting vulnerabilities, and similar situations.
Aqua Security Serverless Scanner Plugin no longer transmits the password form field in plain text.
Beaker builder Plugin stored the Beaker password unencrypted on the Jenkins master. This password could be viewed by users with access to the master file system.
Beaker builder Plugin now stores these credentials encrypted.
These versions include fixes to the vulnerabilities described above. All prior versions are considered to be affected by these vulnerabilities unless otherwise indicated.
The Jenkins project would like to thank the reporters for discovering and reporting these vulnerabilities: