Jenkins Security Advisory 2017-12-14

This advisory announces two vulnerabilities in Jenkins.

Description

Random failures to initialize the setup wizard on startup

SECURITY-667 / CVE-2017-1000503

A race condition during Jenkins startup could result in the wrong order of execution of commands during initialization.

On Jenkins 2.81 and newer, including LTS 2.89.1, this could in rare cases (we estimate less than 20% of new instances) result in failure to initialize the setup wizard on the first startup. This resulted in the following security settings not being set to their usual strict default:

  • No security realm was defined, and no admin user was created whose password was written to the Jenkins log or the initialAdminPassword file.

  • The authorization strategy remained Anyone can do anything rather than Logged-in users can do anything.

  • TCP port for JNLP agents, usually disabled by default, was open, unless a Java system property controlling it was set.

  • CLI over Remoting was enabled.

  • CSRF Protection was disabled.

  • Agent → Controller Access Control was disabled.

Affected instances need to be configured to restrict access.

CSRF protection delayed after startup

SECURITY-667 / CVE-2017-1000504

A race condition during Jenkins startup could result in the wrong order of execution of commands during initialization.

There’s a very short window of time after startup during which Jenkins may no longer show the "Please wait while Jenkins is getting ready to work" message, but Cross-Site Request Forgery (CSRF) protection may not yet be effective. As of publication of this advisory, we’ve been unable to confirm this can actually be exploited, but generally recommend that users upgrade to the fixed versions below.

Severity

  • SECURITY-667: high

Affected versions

  • Random failures to initialize the setup wizard on startup:

    • Jenkins 2.81 through 2.94 (inclusive)

    • Jenkins LTS 2.89.1

  • CSRF protection delayed after startup:

    • Jenkins up to and including 2.94

    • Jenkins LTS up to and including 2.89.1

Fix

  • Jenkins main line users should update to 2.95

  • Jenkins LTS users should update to 2.89.2

  • Users who originally installed Jenkins 2.81 through 2.94, or LTS 2.89.1, should review all the options of the Configure Global Security screen.

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

Credit

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

  • Daniel Beck, CloudBees, Inc. for SECURITY-667

Other Resources