CVE-2020-2136: Jenkins Git Plugin - Stored Cross-Site Scripting Vulnerability

org.jenkins-ci.plugins:git Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.4

CVE-2020-2136: Improper Neutralization of Input During Web Page Generation in Jenkins Git Plugin. Affects org.jenkins-ci.plugins:git versions < 4.2.1. Fixed in 4.2.1. 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 Jenkins Git Plugin is a Maven package that provides integration between Jenkins and Git repositories. It allows users to configure Jenkins jobs to interact with Git repositories, enabling continuous integration and deployment workflows. The plugin supports various Git providers, including Microsoft TFS. However, versions 4.2.0 and earlier of the plugin are vulnerable to a stored cross-site scripting (XSS) vulnerability in the repository URL for Microsoft TFS field form validation.

Vulnerability Detail

The vulnerability arises due to the lack of proper input sanitization in the error message for the repository URL field validation. An attacker can exploit this by injecting malicious scripts into the repository URL, which will be executed when the error message is rendered. This can lead to arbitrary code execution in the context of the victim's browser, potentially compromising sensitive information or performing unauthorized actions.

How To Fix

Minimum fixed version

4.2.1

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

As a temporary workaround, users can manually escape the error message by modifying the affected code in the plugin. The following code snippet demonstrates the necessary changes:

// Original code
String errorMessage = getErrorMessage();

// Workaround code
String escapedErrorMessage = escapeHtml(errorMessage);

Conclusion

The Jenkins Git Plugin versions 4.2.0 and earlier are vulnerable to a stored cross-site scripting (XSS) vulnerability. This can be exploited by injecting malicious scripts into the repository URL, leading to arbitrary code execution in the victim's browser. Users should upgrade to version 4.2.1 or later of the plugin to mitigate this vulnerability. Vulert can help in monitoring and alerting for such vulnerabilities in real-time. For further assistance or support in vulnerability remediation, please contact DevNack.com.

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

Share this vulnerability

FAQ

The vulnerability allows an attacker to execute arbitrary code in the victim's browser, potentially leading to unauthorized actions or the theft of sensitive information.

Versions 4.2.0 and earlier of the Jenkins Git Plugin are affected by this vulnerability.

There is no known exploit for this vulnerability at the time of this report. However, it is advisable to apply the recommended fixes to mitigate the risk.

There are no reported incidents related to this vulnerability at the time of this report.

Yes, Vulert can detect this vulnerability by analyzing the pom.xml file of the affected application. It provides real-time monitoring and alerts for open-source vulnerabilities, including this one.

Related vulnerabilities

Recent vulnerabilities recorded for org.jenkins-ci.plugins:git.

How To Fix

Minimum fixed version

4.2.1

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