CloudBees Security Advisory 2018-02-05

This advisory announces vulnerabilities in these Jenkins plugins:

XXE vulnerabilities in multiple static analysis plugins

SECURITY-659 / CVE-2018-1000054 (CCM)
SECURITY-660 / CVE-2018-1000055 (Android Lint)

Multiple plugins based on Static Analysis Utilities plugin are affected by an XML External Entity (XXE) processing vulnerability. This allows an attacker to configure build processes such that one of these plugins parses a maliciously crafted file that uses external entities for extraction of secrets from the Jenkins master, server-side request forgery, or denial-of-service attacks.

External entity resolution has been disabled for these plugins.

XXE vulnerability in JUnit plugin

SECURITY-521 / CVE-2018-1000056

JUnit plugin is affected by an XML External Entity (XXE) processing vulnerability. This allows an attacker to configure build processes such that JUnit plugin parses a maliciously crafted file that uses external entities for extraction of secrets from the Jenkins master, server-side request forgery, or denial-of-service attacks.

External entity resolution has been adjusted to avoid XXE and still satisfy the existing features.

Credentials Binding plugin did not mask the secret actually provided to the build in rare circumstances

SECURITY-698 / CVE-2018-1000057

Credentials Binding plugin allows specifying passwords and other secrets as environment variables, and will hide them from console output in builds.

However, since Jenkins will try to resolve references to other environment variables in environment variables passed to a build, this can result in other values than the one specified being provided to a build. For example, the value p4$$w0rd would result in Jenkins passing on p4$w0rd , as $$ is the escape sequence for a single $ .

Credentials Binding plugin does not prevent such a transformed value (e.g. p4$w0rd ) from being shown on the build log, allowing users to reconstruct the actual password value from the transformed one.

Credentials Binding plugin will now escape any $ characters in password values so they are correctly passed to the build.

This issue did apply to freestyle and other classic job types, but does not apply to Pipelines.

Arbitrary code execution due to incomplete sandbox protection in Pipeline: Supporting APIs Plugin

SECURITY-699 / CVE-2018-1000058

Pipelines are subject to script security : Either the entire Pipeline needs to be approved, or it runs in a sandbox, with only whitelisted methods etc. allowed to be called.

Methods related to Java deserialization like readResolve implemented in Pipeline scripts were not subject to sandbox protection, and could therefore execute arbitrary code. This could be exploited e.g. by regular Jenkins users with the permission to configure Pipelines in Jenkins, or by trusted committers to repositories containing Jenkinsfiles.

Deserialization of objects in Pipeline is now also subject to sandbox protection.

This change may cause existing scripts relying on the incomplete sandbox protection to start failing, and requiring additional script approval.

Note: This change requires that Pipeline: Groovy plugin is also updated to version 2.44, 2.41.1-cb-1 or 2.32.3-cb-1. Otherwise Pipeline builds using untrusted (folder-scoped) libraries will not be able to resume after a Jenkins master restart

Severity

Affected Versions:

  • Android Lint plugin up to and including 2.5

  • CCM plugin up to and including 3.1

  • Credentials Binding plugin up to and including 1.14

  • JUnit plugin up to and including 1.23

  • Pipeline: Supporting APIs plugin up to and including 2.17

Fix

  • Android Lint plugin (*) should be updated to version 2.6

  • CCM plugin (*) should be updated to version 3.2

  • Credentials Binding plugin should be updated to version 1.15

  • JUnit plugin should be updated to version 1.24 or 1.21.1-cb-1

  • Pipeline: Supporting APIs plugin should be updated to version 2.18, 2.16.1-cb-1 or 2.14.1-cb-1

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

Instructions to get the fixes for the different CloudBees Jenkins Solutions are included below:

  • Plugins marked (*) can be updated through the Plugin Manager.

  • CloudBees Jenkins Enterprise:

    • For version 2.1.0 or 1.11.2 the plugins will be offered by Beekeeper if CAP is enabled or can be updated through the Plugin Manager if CAP is disabled.

    • Users of versions older than 2.1.0 or 1.11.2 should upgrade to 2.1.0 or 1.11.2

  • CloudBees Jenkins Platform (rolling train, CloudBees Jenkins Operations Center and CloudBees Jenkins Enterprise 2.x.y.z):

    • For version 2.89.3.4 the plugins will be offered by Beekeeper if CAP is enabled or can be updated through the Plugin Manager if CAP is disabled.

    • Users of versions older than 2.89.3.4 should upgrade to 2.89.3.4

  • CloudBees Jenkins Platform (fixed train, CloudBees Jenkins Operations Center and CloudBees Jenkins Enterprise 2.73.x.0.z):

    • For version 2.73.28.0.1 the plugins will be offered by Beekeeper if CAP is enabled or can be updated through the Plugin Manager if CAP is disabled.

  • CloudBees Jenkins Platform (fixed train, CloudBees Jenkins Operations Center and CloudBees Jenkins Enterprise 2.46.x.0.y):

    • For version 2.46.28.0.2 the plugins will be offered by Beekeeper if CAP is enabled or can be updated through the Plugin Manager if CAP is disabled.

    • Users of versions older than 2.46.28.0.2 should upgrade to 2.46.28.0.2

  • CloudBees Jenkins Team :

    • For version 2.89.3.4 the plugins will be offered by Beekeeper if CAP is enabled or can be updated through the Plugin Manager if CAP is disabled.

    • Users of versions older than 2.89.3.4 should upgrade to 2.89.3.4.