Jenkins Security Advisory 2022-03-29

This advisory announces vulnerabilities in the following Jenkins deliverables:

Descriptions

Stored XSS vulnerability in Bitbucket Server Integration Plugin

SECURITY-2639 / CVE-2022-28133

Bitbucket Server Integration Plugin 2.0.0 through 3.1.0 (inclusive) does not limit URL schemes for callback URLs on OAuth consumers.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to create BitBucket Server consumers.

Bitbucket Server Integration Plugin 3.2.0 limits allowed URL schemes to prevent creation of consumers with javascript: URL scheme.

Missing permission checks in Bitbucket Server Integration Plugin

SECURITY-2640 / CVE-2022-28134

Bitbucket Server Integration Plugin 3.1.0 and earlier does not perform permission checks in several HTTP endpoints.

This allows attackers with Overall/Read permission to create, view, and delete BitBucket Server consumers.

Bitbucket Server Integration Plugin 3.2.0 requires Overall/System Read permission to view BitBucket Server consumers, and Overall/Administer permission to modify them.

Passwords stored in plain text by instant-messaging Plugin

SECURITY-2161 / CVE-2022-28135

instant-messaging Plugin provides a framework for plugins integrating Jenkins with instant messaging services.

instant-messaging Plugin 1.41 and earlier stores passwords for group chats unencrypted in the global configuration file of plugins based on instant-messaging Plugin on the Jenkins controller.

These passwords can be viewed by users with access to the Jenkins controller file system.

instant-messaging Plugin 1.42 stores passwords for group chats encrypted once the integrating plugin’s configuration is saved again.

CSRF vulnerability and missing permission check in JiraTestResultReporter Plugin

SECURITY-2236 / CVE-2022-28136 (CSRF), CVE-2022-28137 (missing permission check)

JiraTestResultReporter Plugin 165.v817928553942 and earlier does not perform a permission check in a method implementing form validation.

This allows attackers with Overall/Read permission to connect to an attacker-specified URL using attacker-specified credentials.

Additionally, this form validation method does not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability.

This form validation method requires POST requests and Overall/Administer permission in JiraTestResultReporter Plugin 166.v0cc6208295b5.

CSRF vulnerability and missing permission check in RocketChat Notifier Plugin

SECURITY-2241 / CVE-2022-28138 (CSRF), CVE-2022-28139 (missing permission check)

RocketChat Notifier Plugin 1.4.10 and earlier does not perform a permission check in a method implementing form validation.

This allows attackers with Overall/Read permission to connect to an attacker-specified URL using attacker-specified username and password.

Additionally, this form validation method does not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability.

RocketChat Notifier Plugin 1.5.0 requires POST requests and Overall/Administer permission for the affected form validation method.

XXE vulnerability in Flaky Test Handler Plugin

SECURITY-1896 / CVE-2022-28140

Flaky Test Handler Plugin 1.2.1 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks.

This allows attackers with Item/Configure permission to have Jenkins parse a crafted file that uses external entities for extraction of secrets from the Jenkins controller or server-side request forgery.

Flaky Test Handler Plugin 1.2.2 disables external entity resolution for its XML parser.

Password stored in plain text by Proxmox Plugin

SECURITY-2079 / CVE-2022-28141

Proxmox Plugin 0.5.0 and earlier stores the Proxmox Datacenter password unencrypted in the global config.xml file on the Jenkins controller as part of its configuration.

This password can be viewed by users with access to the Jenkins controller file system.

Proxmox Plugin 0.6.0 stores the Proxmox Datacenter password encrypted once its configuration is saved again.

SSL/TLS certificate validation globally disabled by Proxmox Plugin

SECURITY-2081 / CVE-2022-28142

Proxmox Plugin 0.6.0 and earlier disables SSL/TLS certificate validation for the entire Jenkins controller JVM when configured to ignore SSL/TLS issues.

Proxmox Plugin 0.7.0 no longer disables SSL/TLS certificate validation for the entire Jenkins controller JVM.

CSRF vulnerability and missing permission checks in Proxmox Plugin

SECURITY-2082 / CVE-2022-28143 (CSRF), CVE-2022-28144 (missing permission check)

Proxmox Plugin 0.7.0 and earlier does not perform permission checks in several HTTP endpoints.

This allows attackers with Overall/Read permission to:

  • connect to an attacker-specified host using attacker-specified username and password, performing a connection test,

  • disable SSL/TLS validation for the entire Jenkins controller JVM as part of the connection test (see SECURITY-2081 / CVE-2022-28142),

  • and test a rollback with attacker-specified parameters.

Additionally, these endpoints do not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability.

Proxmox Plugin 0.7.1 requires POST requests and Overall/Administer permission for the affected HTTP endpoints.

XSS vulnerability in Continuous Integration with Toad Edge Plugin

SECURITY-1892 / CVE-2022-28145

Continuous Integration with Toad Edge Plugin 2.3 and earlier uses a patched fork of an old version of the file browser for workspaces, archived artifacts, and userContent/ from Jenkins core (DirectoryBrowserSupport) to serve reports.

This fork removes the Content-Security-Policy header functionality introduced for SECURITY-95.

This results in a stored cross-site scripting (XSS) exploitable by attackers with Item/Configure permission or otherwise able to control report contents.

Continuous Integration with Toad Edge Plugin 2.4 uses the built-in Jenkins file browser to serve reports.

Some reports generated by this plugin rely on the ability to execute JavaScript. See the plugin’s documentation for a detailed explanation and options.

Arbitrary file read vulnerability in Continuous Integration with Toad Edge Plugin

SECURITY-2633 / CVE-2022-28146

Continuous Integration with Toad Edge Plugin 2.3 and earlier allows attackers with Item/Configure permission to read arbitrary files on the Jenkins controller by specifying an input folder on the Jenkins controller as a parameter to its build steps.

Continuous Integration with Toad Edge Plugin 2.4 only allows copying files from the node the build is executing on.

Missing permission check in Continuous Integration with Toad Edge Plugin

SECURITY-2635 / CVE-2022-28147

Continuous Integration with Toad Edge Plugin 2.3 and earlier does not perform a permission check in a method implementing form validation.

This allows attackers with Overall/Read permission to check for the existence of an attacker-specified file path on the Jenkins controller file system.

Continuous Integration with Toad Edge Plugin 2.4 requires Overall/Administer permission for the affected form validation method.

Path traversal vulnerability on Windows in Continuous Integration with Toad Edge Plugin

SECURITY-2654 / CVE-2022-28148

Continuous Integration with Toad Edge Plugin 2.3 and earlier uses a patched fork of an old version of the file browser for workspaces, archived artifacts, and userContent/ from Jenkins core (DirectoryBrowserSupport) to serve reports.

The fork did not receive the fix for SECURITY-2481 in Jenkins 2.315 and LTS 2.303.2.

This results in a path traversal vulnerability allowing attackers with Item/Read permission to obtain the contents of arbitrary files on Windows controllers.

Continuous Integration with Toad Edge Plugin 2.4 uses the built-in Jenkins file browser to serve reports, inheriting the fix in Jenkins core if running on a recent enough version.

Stored XSS vulnerability in Job and Node ownership Plugin

SECURITY-2285 / CVE-2022-28149

Job and Node ownership Plugin 0.13.0 and earlier does not escape the names of secondary owners.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers with Item/Configure permission.

As of publication of this advisory, there is no fix.

CSRF vulnerability and missing permission check in Job and Node ownership Plugin

SECURITY-2062 (1) / CVE-2022-28150 (CSRF), CVE-2022-28151 (missing permission check)

Job and Node ownership Plugin 0.13.0 and earlier does not perform a permission check in several HTTP endpoints.

This allows attackers with Item/Read permission to change the owners and item-specific permissions of a job.

Additionally, this endpoint does not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability.

This CSRF vulnerability is only exploitable in Jenkins 2.286 and earlier, LTS 2.277.1 and earlier. See the LTS upgrade guide.

As of publication of this advisory, there is no fix.

CSRF vulnerability in Job and Node ownership Plugin

SECURITY-2062 (2) / CVE-2022-28152

Job and Node ownership Plugin 0.13.0 and earlier does not require POST requests for an HTTP endpoint, resulting in a cross-site request forgery (CSRF) vulnerability.

This vulnerability allows attackers to restore the default ownership of a job.

As of publication of this advisory, there is no fix.

Stored XSS vulnerability in SiteMonitor Plugin

SECURITY-1932 / CVE-2022-28153

SiteMonitor Plugin 0.6 and earlier does not escape URLs of sites to monitor in tooltips.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers with Item/Configure permission.

As of publication of this advisory, there is no fix.

XXE vulnerability in Coverage/Complexity Scatter Plot Plugin

SECURITY-1899 / CVE-2022-28154

Coverage/Complexity Scatter Plot Plugin 1.1.1 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks.

This allows attackers able to control the input files for the 'Public Coverage / Complexity Scatter Plot' post-build step to have Jenkins parse a crafted file that uses external entities for extraction of secrets from the Jenkins controller or server-side request forgery.

As of publication of this advisory, there is no fix.

XXE vulnerability in Pipeline: Phoenix AutoTest Plugin

SECURITY-1897 / CVE-2022-28155

Pipeline: Phoenix AutoTest Plugin 1.3 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks.

This allows attackers able to control the input files for the readXml or writeXml build step to have Jenkins parse a crafted file that uses external entities for extraction of secrets from the Jenkins controller or server-side request forgery.

As of publication of this advisory, there is no fix.

Path traversal vulnerability in Pipeline: Phoenix AutoTest Plugin allows reading arbitrary files

SECURITY-2683 / CVE-2022-28156

Pipeline: Phoenix AutoTest Plugin 1.3 and earlier implements a Pipeline step (copy) to copy files from the running build’s directory on the Jenkins controller to an agent without sanitizing the path specified.

This allows attackers with Item/Configure permission to copy arbitrary files and directories from the Jenkins controller to the agent workspace.

As of publication of this advisory, there is no fix.

Arbitrary file read vulnerability in Pipeline: Phoenix AutoTest Plugin

SECURITY-2684 / CVE-2022-28157

Pipeline: Phoenix AutoTest Plugin 1.3 and earlier implements a Pipeline step (ftp) to upload files to an FTP server without limiting the source directory.

This allows attackers with Item/Configure permission to upload arbitrary files from the Jenkins controller via FTP to an attacker-specified FTP server.

As of publication of this advisory, there is no fix.

Missing permission checks in Pipeline: Phoenix AutoTest Plugin allow enumerating credentials IDs

SECURITY-2685 / CVE-2022-28158

Pipeline: Phoenix AutoTest Plugin 1.3 and earlier does not perform permission checks in several HTTP endpoints.

This allows attackers with Overall/Read permission to enumerate credentials IDs of credentials stored in Jenkins. Those can be used as part of an attack to capture the credentials using another vulnerability.

As of publication of this advisory, there is no fix.

Stored XSS vulnerability in Tests Selector Plugin

SECURITY-2262 / CVE-2022-28159

Tests Selector Plugin 1.3.3 and earlier does not escape the Properties File Path option for Choosing Tests parameters.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers with Item/Configure permission.

As of publication of this advisory, there is no fix.

Arbitrary file read vulnerability in Tests Selector Plugin

SECURITY-2338 / CVE-2022-28160

Tests Selector Plugin 1.3.3 and earlier allows users with Item/Configure permission to read arbitrary files on the Jenkins controller using the Choosing Tests parameter.

As of publication of this advisory, there is no fix.

Severity

Affected Versions

  • Bitbucket Server Integration Plugin up to and including 3.1.0
  • Continuous Integration with Toad Edge Plugin up to and including 2.3
  • Coverage/Complexity Scatter Plot Plugin up to and including 1.1.1
  • Flaky Test Handler Plugin up to and including 1.2.1
  • instant-messaging Plugin up to and including 1.41
  • JiraTestResultReporter Plugin up to and including 165.v817928553942
  • Job and Node ownership Plugin up to and including 0.13.0
  • Pipeline: Phoenix AutoTest Plugin up to and including 1.3
  • Proxmox Plugin up to and including 0.5.0
  • Proxmox Plugin up to and including 0.6.0
  • Proxmox Plugin up to and including 0.7.0
  • RocketChat Notifier Plugin up to and including 1.4.10
  • SiteMonitor Plugin up to and including 0.6
  • Tests Selector Plugin up to and including 1.3.3

Fix

  • Bitbucket Server Integration Plugin should be updated to version 3.2.0
  • Continuous Integration with Toad Edge Plugin should be updated to version 2.4
  • Flaky Test Handler Plugin should be updated to version 1.2.2
  • instant-messaging Plugin should be updated to version 1.42
  • JiraTestResultReporter Plugin should be updated to version 166.v0cc6208295b5
  • Proxmox Plugin should be updated to version 0.6.0
  • Proxmox Plugin should be updated to version 0.7.0
  • Proxmox Plugin should be updated to version 0.7.1
  • RocketChat Notifier Plugin should be updated to version 1.5.0

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

As of publication of this advisory, no fixes are available for the following plugins:

  • Coverage/Complexity Scatter Plot Plugin
  • Job and Node ownership Plugin
  • Pipeline: Phoenix AutoTest Plugin
  • SiteMonitor Plugin
  • Tests Selector Plugin

Credit

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

  • Daniel Beck, CloudBees, Inc. for SECURITY-1892, SECURITY-2062 (1), SECURITY-2062 (2), SECURITY-2081, SECURITY-2082, SECURITY-2683, SECURITY-2684, SECURITY-2685
  • Daniel Beck, CloudBees, Inc. and, independently, Long Nguyen, Viettel Cyber Security, and Marc Heyries for SECURITY-2079
  • Jeff Thompson, CloudBees, Inc. for SECURITY-1896, SECURITY-1897, SECURITY-1899
  • Justin Philip for SECURITY-2338
  • Kevin Guerroudj for SECURITY-2236, SECURITY-2262, SECURITY-2285
  • Kevin Guerroudj, CloudBees, Inc. for SECURITY-2633, SECURITY-2635, SECURITY-2639, SECURITY-2640
  • Marc Heyries for SECURITY-2241
  • Son Nguyen (@s0nnguy3n_) for SECURITY-2161
  • Wadeck Follonier, CloudBees, Inc. for SECURITY-1932