CloudBees Security Advisory 2023-08-16

This advisory announces vulnerabilities in CloudBees CI, CloudBees Jenkins Platform and Jenkins

CSRF vulnerability in Folders Plugin may approve unsandboxed scripts 

SECURITY-3106 / CVE-2023-40336
Severity (CVSS): High
Affected plugin: cloudbees-folder
Description:

Folders Plugin 6.846.v23698686f0f6 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 copy an item, which could potentially automatically approve unsandboxed scripts and allow the execution of unsafe scripts.

An improvement added in Script Security Plugin 1265.va_fb_290b_4b_d34 and 1251.1253.v4e638b_e3b_221 prevents automatic approval of unsandboxed scripts when administrators copy jobs, significantly reducing the impact of this vulnerability.

Folders Plugin 6.872.876.cb-vb_38131665686 requires POST requests for the affected HTTP endpoint.

CSRF vulnerability in Folders Plugin 

SECURITY-3105 / CVE-2023-40337
Severity (CVSS): Medium
Affected plugin: cloudbees-folder
Description:

Folders Plugin 6.846.v23698686f0f6 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 copy a view inside a folder.

Folders Plugin 6.872.876.cb-vb_38131665686 requires POST requests for the affected HTTP endpoint.

Information disclosure in Folders Plugin 

SECURITY-3109 / CVE-2023-40338
Severity (CVSS): Medium
Affected plugin: cloudbees-folder
Description:

Folders Plugin displays an error message when attempting to access the Scan Organization Folder Log if no logs are available.

In Folders Plugin 6.846.v23698686f0f6 and earlier, this error message includes the absolute path of a log file, exposing information about the Jenkins controller file system.

Folders Plugin 6.872.876.cb-vb_38131665686 does not display the absolute path of a log file in the error message.

Improper masking of credentials in Config File Provider Plugin 

SECURITY-3090 / CVE-2023-40339
Severity (CVSS): Medium
Affected plugin: config-file-provider
Description:

Config File Provider Plugin 952.va_544a_6234b_46 and earlier, except 951.953.vdfc5f6e2dcc4, does not mask (i.e., replace with asterisks) credentials specified in configuration files when they’re written to the build log.

Config File Provider Plugin 953.v0432a_802e4d2 and 951.953.vdfc5f6e2dcc4 masks credentials configured in configuration files if they appear in the build log.

Improper masking of credentials in NodeJS Plugin 

SECURITY-3196 / CVE-2023-40340
Severity (CVSS): Medium
Affected plugin: nodejs
Description:

NodeJS Plugin integrates with Config File Provider Plugin to specify custom NPM settings, including credentials for authentication, in a Npm config file.

NodeJS Plugin 1.6.0 and earlier does not properly mask (i.e., replace with asterisks) credentials specified in the Npm config file in Pipeline build logs.

NodeJS Plugin 1.6.0.1 masks credentials specified in the Npm config file in Pipeline build logs.

CSRF vulnerability in Blue Ocean Plugin allows capturing credentials 

SECURITY-3116 / CVE-2023-40341
Severity (CVSS): Medium
Affected plugin: blueocean
Description:

Blue Ocean Plugin 1.27.5 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 connect to an attacker-specified URL, capturing GitHub credentials associated with an attacker-specified job.

This issue is due to an incomplete fix of SECURITY-2502.

Blue Ocean Plugin 1.27.5.1 uses the configured SCM URL, instead of a user-specified URL provided as a parameter to the HTTP endpoint.

CSRF vulnerability and missing permission checks in Fortify Plugin allow capturing credentials 

SECURITY-3115 / CVE-2023-4301 (CSRF), CVE-2023-4302 (missing permission check)
Severity (CVSS): Medium
Affected plugin: fortify
Description:

Fortify Plugin 22.1.38 and earlier does not perform permission checks in several HTTP endpoints.

This allows attackers with Overall/Read permission to connect to an attacker-specified URL using attacker-specified credentials IDs obtained through another method, capturing credentials stored in Jenkins.

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

Fortify Plugin 22.2.39 requires POST requests and the appropriate permissions for the affected HTTP endpoints.

HTML injection vulnerability in Fortify Plugin 

SECURITY-3140 / CVE-2023-4303
Severity (CVSS): Medium
Affected plugin: fortify
Description:

Fortify Plugin 22.1.38 and earlier does not escape the error message for a form validation method. This results in an HTML injection vulnerability.

Since Jenkins 2.275 and LTS 2.263.2, a security hardening for form validation responses prevents JavaScript execution, so no scripts can be injected.

Fortify Plugin 22.2.39 removes HTML tags from the error message.

Stored XSS vulnerability in Flaky Test Handler Plugin 

SECURITY-3223 / CVE-2023-40342
Severity (CVSS): High
Affected plugin: flaky-test-handler
Description:

Flaky Test Handler Plugin 1.2.2 and earlier does not escape JUnit test contents when showing them on the Jenkins UI.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to control JUnit report file contents.

Flaky Test Handler Plugin 1.2.3 escapes JUnit test contents when showing them on the Jenkins UI.

Non-constant time token comparison in Tuleap Authentication Plugin 

SECURITY-3229 / CVE-2023-40343
Severity (CVSS): Low
Affected plugin: tuleap-oauth
Description:

Tuleap Authentication Plugin 1.1.20 and earlier does not use a constant-time comparison when checking whether two authentication tokens are equal.

This could potentially allow attackers to use statistical methods to obtain a valid authentication token.

Tuleap Authentication Plugin 1.1.21 uses a constant-time comparison when validating authentication tokens.

Missing permission check in Delphix Plugin allows enumerating credentials IDs 

SECURITY-3214 (1) / CVE-2023-40344
Severity (CVSS): Medium
Affected plugin: delphix
Description:

Delphix Plugin 3.0.2 and earlier does not perform a permission check in an HTTP endpoint.

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.

An enumeration of credentials IDs in Delphix Plugin 3.0.3 requires the appropriate permissions.

Exposure of system-scoped credentials in Delphix Plugin 

SECURITY-3214 (2) / CVE-2023-40345
Severity (CVSS): Medium
Affected plugin: delphix
Description:

Delphix Plugin 3.0.2 and earlier does not set the appropriate context for credentials lookup, allowing the use of System-scoped credentials otherwise reserved for the global configuration.

This allows attackers with Overall/Read permission to access and capture credentials they are not entitled to.

Delphix Plugin 3.0.3 defines the appropriate context for credentials lookup.

Stored XSS vulnerability in Shortcut Job Plugin 

SECURITY-3071 / CVE-2023-40346
Severity (CVSS): High
Affected plugin: shortcut-job
Description:

Shortcut Job Plugin 0.4 and earlier does not escape the shortcut redirection URL.

This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to configure shortcut jobs.

Shortcut Job Plugin 0.5 escapes the shortcut redirection URL.

Exposure of system-scoped credentials in Maven Artifact ChoiceListProvider (Nexus) Plugin 

SECURITY-3153 / CVE-2023-40347
Severity (CVSS): Medium
Affected plugin: maven-artifact-choicelistprovider
Description:

Maven Artifact ChoiceListProvider (Nexus) Plugin 1.14 and earlier does not set the appropriate context for credentials lookup, allowing the use of System-scoped credentials otherwise reserved for the global configuration.

This allows attackers with Item/Configure permission to access and capture credentials they are not entitled to.

As of publication of this advisory, there is no fix. Learn why we announce this.

Unsafe default behavior and information disclosure in Gogs Plugin webhook 

SECURITY-2894 / CVE-2023-40348 (information disclosure), CVE-2023-40349 (insecure default)
Severity (CVSS): Medium
Affected plugin: gogs-webhook
Description:

Gogs Plugin provides a webhook endpoint at /gogs-webhook that can be used to trigger builds of jobs. In Gogs Plugin 1.0.15 and earlier, an option to specify a Gogs secret for this webhook is provided, but not enabled by default.

This allows unauthenticated attackers to trigger builds of jobs corresponding to the attacker-specified job name.

Additionally, the output of the webhook endpoint includes whether a job corresponding to the attacker-specified job name exists, even if the attacker has no permission to access it.

As of publication of this advisory, there is no fix. Learn why we announce this.

Stored XSS vulnerability in Docker Swarm Plugin 

SECURITY-2811 / CVE-2023-40350
Severity (CVSS): High
Affected plugin: docker-swarm
Description:

Docker Swarm Plugin processes Docker responses to generate the Docker Swarm Dashboard view.

Docker Swarm Plugin 1.11 and earlier does not escape values returned from Docker before inserting them into the Docker Swarm Dashboard view. This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to control responses from Docker.

As of publication of this advisory, there is no fix. Learn why we announce this.

CSRF vulnerability in Favorite View Plugin 

SECURITY-3201 / CVE-2023-40351
Severity (CVSS): Medium
Affected plugin: favorite-view
Description:

Favorite View Plugin 5.v77a_37f62782d 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 add or remove views from another user’s favorite views tab bar.

As of publication of this advisory, there is no fix. Learn why we announce this.

Severity

Fix

  • CloudBees Traditional Platforms should be upgraded to 2.401.3.4

  • CloudBees Cloud Platforms should be upgraded to 2.401.3.4

  • Blue Ocean Plugin should be updated to version 1.27.4.1 or 1.27.5.1

  • CloudBees Folders Plugin should be updated to version 6.872.876.cb-vb_38131665686

  • Config File Provider Plugin should be updated to version 951.953.vdfc5f6e2dcc4 or 953.v0432a_802e4d2

  • Delphix Plugin should be updated to version 3.0.3

  • Flaky Test Handler Plugin should be updated to version 1.2.3

  • Fortify Plugin should be updated to version 22.2.39

  • NodeJS Plugin should be updated to version 1.6.0.1

  • Shortcut Job Plugin should be updated to version 0.5

  • Tuleap Authentication Plugin should be updated to version 1.1.21