CVE-2021-21667: Stored XSS vulnerability in Jenkins Scriptler Plugin
Summary
CVE-2021-21667: Stored XSS vulnerability in Jenkins Scriptler Plugin. Affects org.jenkins-ci.plugins:scriptler versions < 3.3. Fixed in 3.3. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The Jenkins Scriptler Plugin is a Maven-based open-source plugin that allows users to define and execute scripts within Jenkins. It provides a convenient way to automate tasks and customize Jenkins functionality. The plugin is widely used in various software development and CI/CD pipelines. However, versions 3.2 and earlier of the Scriptler Plugin are vulnerable to a stored cross-site scripting (XSS) attack.
Vulnerability Detail
The vulnerability in the Scriptler Plugin arises from the lack of proper parameter name escaping in job configuration forms. Attackers with Scriptler/Configure permission can exploit this vulnerability to inject malicious scripts into the plugin, which will be executed when the affected job is configured or executed. This can lead to unauthorized access, data theft, or further compromise of the Jenkins environment. The vulnerability has been assigned a CVSS score of 8.0, indicating a high severity level.
How To Fix
Minimum fixed version
3.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 is not immediately feasible, users can mitigate the risk by restricting the Scriptler/Configure permission to trusted individuals only. Additionally, it is crucial to sanitize and validate any user-supplied input before using it in job configurations to prevent XSS attacks.
Conclusion
The Scriptler Plugin in Jenkins versions 3.2 and earlier is susceptible to a stored XSS vulnerability. Upgrading to version 3.3 or later is recommended to mitigate the risk. Restricting permissions and implementing proper input sanitization are additional measures to enhance security. For further assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.jenkins-ci.plugins:scriptler →
FAQ
The vulnerability allows attackers to inject malicious scripts into Jenkins job configurations, potentially leading to unauthorized access, data theft, or further compromise of the Jenkins environment.
Attackers with Scriptler/Configure permission in Jenkins can exploit this vulnerability.
Yes, users can mitigate the risk by restricting the Scriptler/Configure permission to trusted individuals and ensuring proper input sanitization and validation.
Users can update the Scriptler Plugin by following the standard plugin update process in Jenkins.
The CVSS score of this vulnerability is 8.0, indicating a high severity level.
Related vulnerabilities
Recent vulnerabilities recorded for org.jenkins-ci.plugins:scriptler.