CVE-2020-2162: XSS

Published Mar 25, 2020
·
Updated

Jenkins 2.227 and earlier, LTS 2.204.5 and earlier does not set Content-Security-Policy headers for files uploaded as file parameters to a build, resulting in a stored XSS vulnerability.

Other sources

Jenkins 2.227 and earlier, LTS 2.204.5 and earlier served files uploaded as file parameters to a build without specifying appropriate Content-Security-Policy HTTP headers. This resulted in a stored cross-site scripting (XSS) vulnerability exploitable by users with permissions to build a job with file parameters.\n\nJenkins now sets Content-Security-Policy HTTP headers when serving files uploaded via a file parameter to the same value as used for files in workspaces and archived artifacts not served using the Resource Root URL.\n\nThe system property hudson.model.DirectoryBrowserSupport.CSP can be set to override the value of Content-Security-Policy headers sent when serving these files. This is the same system property used for files in workspaces and archived artifacts unless those are served via the Resource Root URL and works the same way for file parameters. See Configuring Content Security Policy to learn more.\n\nEven when Jenkins is configured to serve files in workspaces and archived artifacts using the Resource Root URL (introduced in Jenkins 2.200), file parameters are not, and therefore still subject to Content-Security-Policy restrictions.

Affected Software

4 affected componentsFixes available
maven/org.jenkins-ci.main:jenkins-core>=2.204.6<=2.227
2.228
maven/org.jenkins-ci.main:jenkins-core<=2.204.5
2.228
Jenkins Jenkins<=2.204.5
Jenkins Jenkins<=2.227

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.jenkins-ci.main:jenkins-core to a version that resolves this vulnerability.

    Fixed in 2.228
  2. Upgrade

    Upgrade Jenkins to a version that resolves this vulnerability.

    Fixed in 2.228
  3. Configuration

    If you need to customize the CSP sent for files uploaded via file parameters, set the system property hudson.model.DirectoryBrowserSupport.CSP to the desired Content-Security-Policy HTTP header value.}}]} }}} }

    Jenkins hudson.model.DirectoryBrowserSupport.CSP = override Content-Security-Policy HTTP headers for files uploaded via file parameters (set to the desired CSP value)

Event History

Mar 25, 2020
CVE Published
via MITRE·04:05 PM
Data Sourced
via MITRE·04:05 PM
Description
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeaknessAffected Software
May 24, 2022
Advisory Published
05:12 PM

Frequently Asked Questions

1

What is the severity of CVE-2020-2162?

CVE-2020-2162 is classified as a high severity vulnerability due to its potential for stored cross-site scripting (XSS).

2

How do I fix CVE-2020-2162?

To fix CVE-2020-2162, upgrade Jenkins to version 2.228 or later.

3

Which versions of Jenkins are affected by CVE-2020-2162?

CVE-2020-2162 affects Jenkins versions 2.227 and earlier, as well as LTS 2.204.5 and earlier.

4

What type of vulnerability is CVE-2020-2162?

CVE-2020-2162 is a stored cross-site scripting (XSS) vulnerability that arises from inadequate Content-Security-Policy headers.

5

Is there a workaround for CVE-2020-2162?

There are no known workarounds for CVE-2020-2162; upgrading to a fixed version is the recommended solution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203