Bug 1418719 (CVE-2017-2607)

Summary: CVE-2017-2607 jenkins: Persisted cross-site scripting vulnerability in console notes (SECURITY-382)
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, bleanhar, ccoleman, dedgar, dmcphers, java-sig-commits, jgoulding, joelsmith, mizdebsk, msrb, tdawson, tiwillia
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: jenkins 2.44, jenkins 2.32.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 11:50:14 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: 1418736    
Bug Blocks: 1395176, 1418735    

Description Andrej Nemec 2017-02-02 15:04:51 UTC
The following flaw was found in Jenkins:

Jenkins allows plugins to annotate build logs, adding new content or changing the presentation of existing content while the build is running. Popular examples include the highlighting of sections by Ant Plugin, or the timestamp metadata from Timestamper. Malicious Jenkins users, or users with SCM access, could configure jobs or modify build scripts such that they print serialized console notes that perform cross-site scripting attacks on Jenkins users viewing the build logs.

To prevent this, console notes are now signed by Jenkins when created, and Jenkins will only deserialize correctly signed console notes. As a side effect, console notes created before updating to a release containing this fix will no longer be deserialized. To restore the previous (unsafe) behavior, set the system property hudson.console.ConsoleNote.INSECURE to true as described on Features controlled by system properties.

External References:

https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2017-02-01

Upstream patch:

https://github.com/jenkinsci/jenkins/commit/2527e66dd8f9dd23a2571f8bd8f2918edf6fc0cd

Comment 1 Andrej Nemec 2017-02-02 15:27:19 UTC
Created jenkins tracking bugs for this issue:

Affects: fedora-all [bug 1418736]