
====================================================================

                             CERT-Renater

                 Note d'Information No. 2018/VULN049
_____________________________________________________________________

DATE                : 13/02/2018

HARDWARE PLATFORM(S): /

OPERATING SYSTEM(S): Systems running Android Lint Plugin for Jenkins,
                           CCM Plug-in for Jenkins,
                           Credentials Binding Plugin for Jenkins,
                           JUnit Plugin for Jenkins,
                           Pipeline: Supporting APIs for Jenkins,
                           Ant Plugin for Jenkins,
                           Checkstyle Plug-in for Jenkins,
                           DRY Plug-in for Jenkins,
                           FindBugs Plug-in for Jenkins,
                           Jenkins Release Plugin for Jenkins,
                      Jenkins Translation Assistance plugin for Jenkins,
                           PMD Plug-in for Jenkins,
                           Pipeline: Nodes and Processes for Jenkins,
                           Warnings Plug-in for Jenkins.

=====================================================================
https://jenkins.io/security/advisory/2018-02-05/
https://jenkins.io/security/advisory/2018-01-22/
_____________________________________________________________________


Jenkins Security Advisory 2018-02-05

This advisory announces vulnerabilities in the following Jenkins
deliverables:

    Android Lint Plugin
    CCM Plug-in
    Credentials Binding Plugin
    JUnit Plugin
    Pipeline: Supporting APIs


Description

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.
	This change requires that Pipeline: Groovy plugin is also
updated to version 2.44, 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 Plug-in 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 up to and including 2.17

Fix

    Android Lint Plugin should be updated to version 2.6
    CCM Plug-in 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
    Pipeline: Supporting APIs should be updated to version 2.18

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


Credit

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

    Adith Sudhakar for SECURITY-659, SECURITY-660
    Aleksandr Kazakov for SECURITY-699
    James Nord, CloudBees, Inc. for SECURITY-521

Other Resources

    Announcement blog post

_____________________________________________________________________


 Jenkins Security Advisory 2018-01-22

This advisory announces vulnerabilities in the following Jenkins
deliverables:

    Ant Plugin
    Checkstyle Plug-in
    DRY Plug-in
    FindBugs Plug-in
    Jenkins Release Plugin
    Jenkins Translation Assistance plugin
    PMD Plug-in
    Pipeline: Nodes and Processes
    Warnings Plug-in


Description

XXE vulnerabilities in multiple static analysis plugins

    SECURITY-655 / CVE-2018-1000008 (PMD)

    SECURITY-656 / CVE-2018-1000009 (Checkstyle)

    SECURITY-657 / CVE-2018-1000010 (DRY)

    SECURITY-658 / CVE-2018-1000011 (FindBugs)

    SECURITY-695 / CVE-2018-1000012 (Warnings)

Multiple plugins based on Static Analysis Utilities plugin are affected
by an XML External Entity (XXE) processing vulnerability. This allows
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.


CSRF vulnerability in Release plugin

SECURITY-607 / CVE-2018-1000013

Release plugin did not require form submissions to be submitted via
POST, resulting in a CSRF vulnerability allowing attackers to trigger
release builds.

Access to the form action URL now requires POST.


CSRF vulnerability in Translation Assistance plugin

SECURITY-507 / CVE-2018-1000014

Translation Assistance plugin did not require form submissions to be
submitted via POST, resulting in a CSRF vulnerability allowing
attackers to override localized strings displayed to all users on the
current Jenkins instance if the victim is a Jenkins administrator.

Access to the form action URL now requires POST.


Incorrect permission checks in Pipeline: Nodes and Processes plugin
allows executing builds on agents while lacking Computer/Build
permission

SECURITY-675 / CVE-2018-1000015

On instances with Authorize Project plugin, the authentication
associated with a build may lack the Computer/Build permission on some
agents. This did not prevent the execution of node blocks on those
agents due to incorrect permissions checks in Pipeline: Nodes and
Processes plugin.

Build permissions on agents are now properly enforced for node steps.


XSS vulnerability in job configuration forms in Ant plugin

SECURITY-624 and SECURITY-694

Ant plugin failed to escape tool names it shows on job configuration
screens, resulting in a cross-site scripting (XSS) vulnerability that
is exploitable only by Jenkins administrators.

This is the same vulnerability that was announced without a fix on
2017-12-05. Contrary to what we wrote in that security advisory, Ant
Plugin shows both the JDK and Ant tools on the configuration screen,
and the vulnerability in Ant plugin was responsible for both problems
we confirmed in the previous advisory.

Ant plugin now correctly escapes tool names shown on the job
configuration screen.


Severity

Affected Versions

    Ant Plugin up to and including 1.7
    Checkstyle Plug-in up to and including 3.49
    DRY Plug-in up to and including 2.49
    FindBugs Plug-in up to and including 4.71
    Jenkins Release Plugin up to and including 2.9
    Jenkins Translation Assistance plugin up to and including 1.15
    PMD Plug-in up to and including 1.7
    Pipeline: Nodes and Processes up to and including 2.17
    Warnings Plug-in up to and including 4.64

Fix

    Ant Plugin should be updated to version 1.8
    Checkstyle Plug-in should be updated to version 3.5
    DRY Plug-in should be updated to version 2.5
    FindBugs Plug-in should be updated to version 4.72
    Jenkins Release Plugin should be updated to version 2.1
    Jenkins Translation Assistance plugin should be updated to version 1.16
    PMD Plug-in should be updated to version 1.8
    Pipeline: Nodes and Processes should be updated to version 2.18
    Warnings Plug-in should be updated to version 4.65

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


Credit

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

    Adith Sudhakar for SECURITY-655, SECURITY-656, SECURITY-657,
                       SECURITY-658
    Jesse Glick, CloudBees, Inc. for SECURITY-607, SECURITY-675
    Oleg Nenashev, CloudBees, Inc. for SECURITY-507



==========================================================
+ CERT-RENATER          | tel : 01-53-94-20-44           +
+ 23 - 25 Rue Daviel    | fax : 01-53-94-20-41           +
+ 75013 Paris           | email: cert@support.renater.fr +
==========================================================



