CVE-2020-2214: Zap pipeline Content-Security-Policy Protection For User Content Vulnerability

MODERATE
Advisory Identifier: GHSA-4c87-9xq5-5c35
CVSS 5.4
CWE-79
Published
Advisory Summary

CVE-2020-2214 is a MODERATE (CVSS 5.4) content-security-policy protection for user content vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Zap pipeline libraries in the Maven ecosystem. The issue involves content-security-policy protection for user content disabled by jenkins zap pipeline plugin. Remediation is available by upgrading affected packages to version 1.10.

CVE-2020-2214 at a Glance

CVE Identifier CVE-2020-2214
GHSA Identifier GHSA-4c87-9xq5-5c35
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Zap pipeline
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-2214

To remediate this vulnerability, upgrade all affected Zap pipeline dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.vrondakis.zap:zap-pipeline fixed: 1.10
<dependency>
    <groupId>com.vrondakis.zap</groupId>
    <artifactId>zap-pipeline</artifactId>
    <version>1.10</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.vrondakis.zap

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-2214, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.vrondakis.zap

Analyze the terminal output to locate any version of Zap pipeline in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.vrondakis.zap command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Zap pipeline, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Jenkins sets the `Content-Security-Policy` header to static files served by Jenkins (specifically `DirectoryBrowserSupport`), such as workspaces, `/userContent`, or archived artifacts. ZAP Pipeline Plugin prior to 1.10 globally disables the `Content-Security-Policy` header for static files served by Jenkins. This allows cross-site scripting (XSS) attacks by users with the ability to control files in workspaces, archived artifacts, etc. Jenkins instances with [Resource Root URL](https://www.jenkins.io/doc/upgrade-guide/2.204/#resource-domain-support) configured are largely unaffected. A possible exception are file parameter downloads. The behavior of those depends on the specific version of Jenkins: - Jenkins 2.231 and newer, including 2.235.x LTS, is unaffected, as all resource files from user content are generally served safely from a different domain, without restrictions from `Content-Security-Policy` header. - Jenkins between 2.228 (inclusive) and 2.230 (inclusive), as well as all releases of Jenkins 2.222.x LTS and the 2.204.6 LTS release, are affected by this vulnerability, as file parameters are not served via the Resource Root URL. - Jenkins 2.227 and older, 2.204.5 and older, don’t have XSS protection for file parameter values, see [SECURITY-1793](https://www.jenkins.io/security/advisory/2020-03-25/#SECURITY-1793).

CVE-2020-2214 Affected Zap pipeline Versions

1 component(s)
Fixed Versions:
1.10
Product / Package Ecosystem Affected Versions Fixed Version
com.vrondakis.zap:zap-pipeline
Maven
< 1.10
1.10

References

Frequently Asked Questions

What is CVE-2020-2214?
CVE-2020-2214 is a security vulnerability in Zap pipeline involving Content-Security-Policy protection for user content disabled by Jenkins ZAP Pipeline Plugin under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Zap pipeline versions are affected?
Affected versions include releases prior to 1.10 across affected packages: com.vrondakis.zap:zap-pipeline.
What version fixes CVE-2020-2214?
Upgrading to 1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zap-pipeline affected?
Yes, com.vrondakis.zap:zap-pipeline is affected in releases prior to 1.10. Upgrade your dependency to 1.10 or later.
What is the CVSS score of CVE-2020-2214?
CVE-2020-2214 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-2214?
CVE-2020-2214 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2020-2214?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.vrondakis.zap'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4c87-9xq5-5c35",
  "modified" : "2022-12-29T01:09:19Z",
  "published" : "2022-05-24T17:22:20Z",
  "aliases" : [ "CVE-2020-2214" ],
  "summary" : "Content-Security-Policy protection for user content disabled by Jenkins ZAP Pipeline Plugin",
  "details" : "Jenkins sets the `Content-Security-Policy` header to static files served by Jenkins (specifically `DirectoryBrowserSupport`), such as workspaces, `/userContent`, or archived artifacts.\n\nZAP Pipeline Plugin prior to 1.10 globally disables the `Content-Security-Policy` header for static files served by Jenkins. This allows cross-site scripting (XSS) attacks by users with the ability to control files in workspaces, archived artifacts, etc.\n\nJenkins instances with [Resource Root URL](https://www.jenkins.io/doc/upgrade-guide/2.204/#resource-domain-support) configured are largely unaffected. A possible exception are file parameter downloads. The behavior of those depends on the specific version of Jenkins:\n- Jenkins 2.231 and newer, including 2.235.x LTS, is unaffected, as all resource files from user content are generally served safely from a different domain, without restrictions from `Content-Security-Policy` header.\n- Jenkins between 2.228 (inclusive) and 2.230 (inclusive), as well as all releases of Jenkins 2.222.x LTS and the 2.204.6 LTS release, are affected by this vulnerability, as file parameters are not served via the Resource Root URL.\n- Jenkins 2.227 and older, 2.204.5 and older, don’t have XSS protection for file parameter values, see [SECURITY-1793](https://www.jenkins.io/security/advisory/2020-03-25/#SECURITY-1793).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.vrondakis.zap:zap-pipeline"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-2214"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/zap-pipeline-plugin/commit/bca4b087c66ead39398f54cdadc27c515e8ede31"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jenkinsci/zap-pipeline-plugin"
  }, {
    "type" : "WEB",
    "url" : "https://jenkins.io/security/advisory/2020-07-02/#SECURITY-1811"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/07/02/7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-29T01:09:19Z",
    "nvd_published_at" : "2020-07-02T15:15:00Z"
  }
}