CVE-2022-30958: Cross Site Request Forgery in Jenkins SSH Plugin
Summary
CVE-2022-30958: Cross Site Request Forgery in Jenkins SSH Plugin. Affects org.jenkins-ci.plugins:ssh versions < 2.6.1. No fix is published. 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 SSH Plugin is a Maven package that allows users to execute commands on remote machines via SSH. It provides a convenient way to automate tasks and manage remote systems. The plugin integrates with Jenkins, a popular open-source automation server, to enable seamless execution of SSH commands within Jenkins pipelines. However, versions 2.6.1 and earlier of the SSH Plugin are vulnerable to a cross-site request forgery (CSRF) attack.
Vulnerability Detail
The vulnerability in the Jenkins SSH Plugin allows attackers to perform unauthorized SSH connections to attacker-specified servers using credentials obtained through another method. By exploiting this vulnerability, an attacker can capture and misuse credentials stored in Jenkins. This can lead to unauthorized access to sensitive systems, data breaches, and potential compromise of the entire Jenkins infrastructure. The vulnerability has a CVSS score of 7.1, indicating a high severity level.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can disable the SSH Plugin or restrict access to the plugin by configuring appropriate access controls. This can help mitigate the risk of CSRF attacks until the plugin is updated to a secure version. Here's an example of how to disable the SSH Plugin in Jenkins:
- Go to the Jenkins dashboard.
- Navigate to 'Manage Jenkins' > 'Manage Plugins'.
- Select the 'Installed' tab.
- Locate the 'SSH Plugin' and uncheck the checkbox.
- Click 'Apply Changes' to save the configuration.
Please note that disabling the plugin will prevent any SSH-related functionality in Jenkins.
Conclusion
The Jenkins SSH Plugin is vulnerable to a CSRF attack, allowing unauthorized SSH connections using stolen credentials. It is crucial to upgrade to version 2.6.2 or later of the plugin to fix this vulnerability. In the meantime, users can apply a temporary workaround by disabling the SSH Plugin or implementing access controls. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.jenkins-ci.plugins:ssh →
FAQ
Cross-Site Request Forgery (CSRF) is an attack that tricks the victim into submitting a malicious request. In the case of the Jenkins SSH Plugin vulnerability, it allows an attacker to perform unauthorized SSH connections using stolen credentials.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your Jenkins installation is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it for any open-source vulnerabilities, including CVE-2022-30958.
The consequences of this vulnerability include unauthorized access to sensitive systems, potential data breaches, and compromise of the Jenkins infrastructure. It is crucial to address this vulnerability promptly to mitigate these risks.
Yes, a patch is available in version 2.6.2 of the Jenkins SSH Plugin. It is recommended to upgrade to this version or later to fix the vulnerability.
Yes, you can disable the SSH Plugin in Jenkins to mitigate the risk of CSRF attacks. However, this will disable any SSH-related functionality in Jenkins. It is recommended to update to a secure version of the plugin as soon as possible.
Related vulnerabilities
Recent vulnerabilities recorded for org.jenkins-ci.plugins:ssh.