Bug 1522902

Summary: jenkins: Stored XSS vulnerability in tool names exploitable by administrators (SECURITY-624)
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ahardin, bleanhar, ccoleman, dedgar, dmcphers, java-sig-commits, jgoulding, jokerman, mchappel, mizdebsk, msrb
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 11:57:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1522903, 1522904, 1565286    
Bug Blocks: 1522907    

Description Adam Mariš 2017-12-06 17:29:23 UTC
Jenkins administrators can configure tools, such as JDK, Maven, or Ant, that will be available in job configurations for use by build scripts.

Some tool names are not properly escaped on job configuration forms, resulting in a stored cross-site scripting vulnerability.

Tools confirmed to be affected are:

    JDK (provided by Jenkins core)

    Ant (provided by Ant plugin)

Others may also be affected by this.

This vulnerability can only be exploited by Jenkins administrators, as they’re the only ones able to define tools. In the vast majority of Jenkins configurations, administrators are able to run any code and install any plugin. Therefore this vulnerability only really affects installations that don’t grant administrators the Run Scripts, Configure Update Sites, and Install Plugins permissions.

The Jenkins project has prepared a plugin preventing the configuration of unsafe tool names at https://github.com/jenkinsci-cert/security624 as a workaround.

External References:

https://jenkins.io/security/advisory/2017-12-05/

Comment 1 Adam Mariš 2017-12-06 17:29:48 UTC
Created jenkins tracking bugs for this issue:

Affects: fedora-all [bug 1522903]
Affects: openshift-1 [bug 1522904]