This advisory announces vulnerabilities in the following Jenkins deliverables:
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 controller.
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.
Cloud Foundry Plugin did not perform permission checks on a method implementing form validation. This allowed users with Overall/Read access to Jenkins to connect to an attacker-specified URL using attacker-specified credentials IDs obtained through another method, capturing credentials stored in Jenkins.
Additionally, this form validation method did not require POST requests, resulting in a cross-site request forgery vulnerability.
This form validation method now requires POST requests and Overall/Administer (for global configuration) or Item/Configure permissions (for job configuration).
A missing permission check in a form validation method in Mattermost Notification Plugin allowed users with Overall/Read permission to initiate a connection test, connecting to an attacker-specified Mattermost server and room and posting a message.
Additionally, this form validation method did not require POST requests, resulting in a CSRF vulnerability.
This form validation method now requires POST requests and performs a permission check.
A missing permission check in a form validation method in OctopusDeploy Plugin allowed users with Overall/Read permission to initiate a connection test, sending an HTTP HEAD request to an attacker-specified URL, returning HTTP response code if successful, or exception error message otherwise.
Additionally, this form validation method did not require POST requests, resulting in a CSRF vulnerability.
This form validation method now requires POST requests and performs a permission check.
A missing permission check in a form validation method in JMS Messaging Plugin allowed users with Overall/Read permission to initiate a connection test, sending an HTTP request to an attacker-specified URL.
Additionally, this form validation method did not require POST requests, resulting in a CSRF vulnerability.
This form validation method now requires POST requests and performs a permission check.
ElectricFlow Plugin unconditionally disabled SSL/TLS certificate validation for the entire Jenkins controller JVM.
ElectricFlow Plugin 1.1.5 and newer no longer do that.
Acunetix Plugin stored the API Key in its configuration unencrypted in its global configuration file on the Jenkins controller. This key could be viewed by users with access to the Jenkins controller file system.
The plugin now integrates with Credentials Plugin.
A missing permission check in a form validation method in Acunetix Plugin allowed users with Overall/Read permission to initiate a connection test, sending an HTTP GET request to an attacker-specified URL, adding a /me
suffix, returning whether the connection could be established and whether the HTTP response code is 200.
Additionally, this form validation method did not require POST requests, resulting in a CSRF vulnerability.
This form validation method now requires POST requests and performs a permission check.
Arxan MAM Publisher Plugin stored the username and password connection credentials in its configuration unencrypted in jobs' config.xml
files on the Jenkins controller.
This key could be viewed by users with Extended Read permission, or access to the Jenkins controller file system.
While masked from view using a password form field, the password was transferred in plain text to users when accessing the job configuration form.
The plugin now integrates with Credentials Plugin.
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: