CVE-2020-2256: Stored XSS vulnerability in Pipeline Maven Integration Plugin via unescaped display name

Summary

24/05/2022
Yes i
High
8.0

CVE-2020-2256: Stored XSS vulnerability in Pipeline Maven Integration Plugin via unescaped display name. Affects org.jenkins-ci.plugins:pipeline-maven versions < 3.9.3. Fixed in 3.9.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Pipeline Maven Integration Plugin is a plugin for Jenkins, an open-source automation server. It provides integration between Jenkins pipelines and Maven projects, allowing users to build, test, and deploy Maven-based projects. The plugin allows users to define pipelines that automate the build and deployment process for Maven projects within Jenkins. This vulnerability affects versions 3.9.2 and earlier of the Pipeline Maven Integration Plugin.

Vulnerability Detail

The vulnerability in the Pipeline Maven Integration Plugin arises from a failure to properly escape the display name of an upstream job shown as part of a build cause. This allows an attacker with Job/Configure permission to inject malicious code into the display name, resulting in a stored cross-site scripting (XSS) vulnerability. When the vulnerable plugin is used in conjunction with Jenkins, an attacker could exploit this vulnerability to execute arbitrary JavaScript code in the context of a user's browser. This could lead to various security risks, such as stealing sensitive information or performing actions on behalf of the user.

How To Fix

Minimum fixed version

3.9.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of the Pipeline Maven Integration Plugin is not immediately feasible, users can implement a workaround by manually escaping the display name of upstream jobs in build causes. This can be done by modifying the Jenkins pipeline script to sanitize the display name before it is used in the build cause. Here is an example of how to escape the display name using Groovy script:

import hudson.model.Cause

def upstreamJobName = 'Upstream Job'
def escapedUpstreamJobName = Cause.escape(upstreamJobName)

Conclusion

The Pipeline Maven Integration Plugin versions 3.9.2 and earlier are vulnerable to a stored XSS vulnerability. This vulnerability can be mitigated by upgrading to version 3.9.3 or later of the plugin. If immediate upgrade is not possible, users can implement a workaround by manually escaping the display name of upstream jobs in build causes. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.jenkins-ci.plugins:pipeline-maven →

Share this vulnerability

FAQ

This vulnerability allows an attacker with Job/Configure permission to execute arbitrary JavaScript code in the context of a user's browser. This could lead to various security risks, such as stealing sensitive information or performing actions on behalf of the user.

Users of Jenkins who have the Pipeline Maven Integration Plugin installed and are using versions 3.9.2 or earlier are affected by this vulnerability.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert analyzes the pom.xml file of your application to identify and alert you about open-source vulnerabilities in real-time.

Yes, a fix is available in version 3.9.3 of the Pipeline Maven Integration Plugin. It is recommended to upgrade to this version or later to mitigate the vulnerability.

If upgrading to the latest version of the Pipeline Maven Integration Plugin is not immediately feasible, you can manually escape the display name of upstream jobs in build causes using Groovy script. Refer to the 'workaround' section for more details.

Related vulnerabilities

Recent vulnerabilities recorded for org.jenkins-ci.plugins:pipeline-maven.

How To Fix

Minimum fixed version

3.9.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback