CVE-2021-21649: Cross-site Scripting in Jenkins Dashboard View Plugin

Summary

16/06/2021
Yes i
Moderate
5.4

CVE-2021-21649: Cross-site Scripting in Jenkins Dashboard View Plugin. Affects org.jenkins-ci.plugins:dashboard-view across 2 version ranges.

< 2.12.1 >= 2.13, < 2.16

Fixed in 2.12.1 or 2.16, depending on the release line you run. 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 Your last release was probably never penetration tested 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 Dashboard View Plugin is a plugin for the Jenkins automation server that provides a customizable dashboard view for monitoring and managing Jenkins jobs. It allows users to create a dashboard with various portlets, including image portlets that display images from specified URLs. This plugin is widely used in Jenkins installations for visualizing job information and status.

Vulnerability Detail

The Jenkins Dashboard View Plugin prior to version 2.16 and 2.12.1 is vulnerable to a stored cross-site scripting (XSS) attack. The plugin does not properly escape URLs referenced in Image Dashboard Portlets, allowing an attacker with View/Configure permission to inject malicious scripts into the dashboard. This vulnerability can be exploited to execute arbitrary code in the context of other users who view the affected dashboard. The vulnerability has a CVSS score of 8.0, indicating a high severity.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.12.1 2.12.1
  • >= 2.13, < 2.16 2.16

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, users can manually escape the URLs referenced in Image Dashboard Portlets. This can be done by modifying the affected dashboard configuration and ensuring that the URLs are properly encoded or sanitized to prevent script injection. Here is an example of how to encode a URL in JavaScript:

var encodedUrl = encodeURIComponent(url);

Conclusion

The Jenkins Dashboard View Plugin prior to version 2.16 and 2.12.1 is vulnerable to a stored cross-site scripting (XSS) attack. Upgrading to the fixed version or applying the recommended workaround will mitigate the risk of this vulnerability. It is important to promptly address this issue to prevent unauthorized access and potential exploitation of the Jenkins server. For further assistance or support in vulnerability remediation, please contact DevNack.com.

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

Share this vulnerability

FAQ

This vulnerability allows an attacker to inject malicious scripts into the Jenkins dashboard, potentially leading to unauthorized access, data theft, or further exploitation of the Jenkins server.

Users of Jenkins Dashboard View Plugin versions prior to 2.16 and 2.12.1 are affected by this vulnerability. Users with View/Configure permission are particularly at risk.

At the time of this advisory, there are no known public exploits specifically targeting this vulnerability. However, it is advisable to apply the recommended fix or workaround as soon as possible to mitigate the risk.

No, this vulnerability requires an attacker to have View/Configure permission in Jenkins. However, if an attacker gains such permissions, the vulnerability can be exploited remotely by tricking users with access to the affected dashboard into visiting a specially crafted URL.

Yes, this vulnerability has a CVSS score of 8.0, indicating a high severity. The CVSS score is based on the technical details of the vulnerability and helps assess its potential impact and urgency for remediation.

Related vulnerabilities

Recent vulnerabilities recorded for org.jenkins-ci.plugins:dashboard-view.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.12.1 2.12.1
  • >= 2.13, < 2.16 2.16

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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