GHSA-g74w-93cp-5p3p

Suggest an improvement
Source
https://github.com/advisories/GHSA-g74w-93cp-5p3p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-g74w-93cp-5p3p/GHSA-g74w-93cp-5p3p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g74w-93cp-5p3p
Aliases
Published
2022-05-18T00:00:40Z
Modified
2024-02-16T08:16:20.668202Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Insufficiently Protected Credentials in Jenkins Pipeline SCM API for Blue Ocean Plugin
Details

When pipelines are created using the pipeline creation wizard in Blue Ocean, the credentials used are stored in the per-user credentials store of the user creating the pipeline. To allow pipelines to use this credential to scan repositories and checkout from SCM, the Blue Ocean Credentials Provider allows pipelines to access a specific credential from the per-user credentials store in Pipeline SCM API for Blue Ocean Plugin 1.25.3 and earlier.

As a result, attackers with Job/Configure permission can rewrite job configurations in a way that lets them access and capture any attacker-specified credential from any user’s private credentials store.

Pipeline SCM API for Blue Ocean Plugin 1.25.4 deprecates the Blue Ocean Credentials Provider and disables it by default. As a result, all jobs initially set up using the Blue Ocean pipeline creation wizard and configured to use the credential specified at that time will no longer be able to access the credential, resulting in failures to scan repositories, checkout from SCM, etc. unless the repository is public and can be accessed without credentials.

This also applies to newly created pipelines after Pipeline SCM API for Blue Ocean Plugin has been updated to 1.25.4.

Administrators should reconfigure affected pipelines to use a credential from the Jenkins credential store or a folder credential store. See this help page on cloudbees.com to learn more.

To re-enable the Blue Ocean Credentials Provider, set the Java system property io.jenkins.blueocean.rest.impl.pipeline.credential.BlueOceanCredentialsProvider.enabled to true. Doing so is discouraged, as that will restore the unsafe behavior.

While Credentials Plugin provides the Configure Credential Providers UI to enable or disable certain credentials providers, enabling the Blue Ocean Credentials Provider there is not enough in Pipeline SCM API for Blue Ocean Plugin 1.25.4. Both the UI and system property need to enable the Blue Ocean Credentials Provider.

Administrators not immediately able to update Blue Ocean are advised to disable the Blue Ocean Credentials Provider through the UI at Manage Jenkins » Configure Credential Providers and to reconfigure affected pipelines to use a credential from the Jenkins credential store or a folder credential store.

References

Affected packages

Maven / io.jenkins.blueocean:blueocean-pipeline-scm-api

Package

Name
io.jenkins.blueocean:blueocean-pipeline-scm-api
View open source insights on deps.dev
Purl
pkg:maven/io.jenkins.blueocean/blueocean-pipeline-scm-api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.25.4

Affected versions

1.*

1.1.0-beta-4
1.1.0-beta-8
1.1.0-beta-9
1.1.0
1.1.1
1.1.2
1.1.3
1.1.4
1.1.5
1.1.6
1.1.7
1.2.0-beta-1
1.2.0-beta-3
1.2.0-beta-4
1.2.0-beta-5
1.2.0-beta-6
1.2.0-beta-7
1.2.0
1.2.1
1.2.2
1.2.3
1.2.4
1.3.0-beta-1
1.3.0-beta-2
1.3.0-beta-3
1.3.0-beta-4
1.3.0-beta-5
1.3.0-beta-6
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.4.0-beta-3
1.4.0-beta-4
1.4.0-beta-5
1.4.0
1.4.1
1.4.2
1.5.0-beta-1
1.5.0-beta-2
1.5.0
1.5.1
1.5.2
1.5.3
1.5.4
1.5.5
1.6.0-beta-1
1.6.0-beta-3
1.6.0
1.6.1
1.6.2
1.7.0
1.7.1
1.7.2
1.8.0
1.8.2
1.8.3
1.8.4
1.9.0
1.9.1
1.10.1
1.10.2
1.11.0
1.11.1
1.13.0
1.13.1
1.13.2
1.14.0
1.15.0
1.15.1
1.16.0
1.17.0
1.18.0
1.18.1
1.19.0
1.19.1
1.19.2
1.21.0
1.22.0
1.23.0
1.23.1
1.23.2
1.23.3
1.24.0
1.24.1
1.24.2
1.24.3
1.24.4
1.24.5
1.24.6
1.24.7
1.24.8
1.25.0-alpha-1
1.25.0
1.25.0.1
1.25.1
1.25.2
1.25.3