CVE-2026-57282: Jenkins Git Client Plugin SSH Wrapper Command Injection
Jenkins Git client Plugin versions 6.6.0 and earlier contain a command injection flaw in how they construct SSH wrapper scripts. When a Jenkins build runs in a workspace with a specially crafted directory name, an attacker with the ability to influence that workspace path can inject arbitrary shell commands that execute on the Jenkins agent. This requires authenticated access to create or influence build job workspace naming, limiting immediate risk but creating a significant privilege-escalation vector in multi-tenant Jenkins environments.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.0 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
- Weaknesses (CWE)
- CWE-78
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-06-26
NVD description (verbatim)
Jenkins Git client Plugin 6.6.0 and earlier does not correctly escape the workspace directory name when it is embedded into a generated SSH wrapper script, allowing attackers able to control the name of a build's working directory to execute arbitrary operating system commands on the agent.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from inadequate input sanitization of the workspace directory name when it is embedded into an automatically generated SSH wrapper script. The Git client plugin constructs shell script content that incorporates the workspace path without proper escaping or quoting. An attacker who can control the workspace directory name—either through direct job configuration or through Jenkins features that allow workspace path customization—can inject shell metacharacters and commands that will be executed by the SSH wrapper during Git operations. This is classified as OS command injection (CWE-78) with a CVSS 3.1 score of 5.0 (Medium severity), reflecting the requirement for authenticated access and indirect control over workspace paths.
Business impact
In Jenkins environments where build workspace names can be influenced by users or external systems, this vulnerability enables lateral movement and privilege escalation. An attacker with job creation or workspace configuration privileges could execute arbitrary commands on build agents, potentially compromising agent infrastructure, exfiltrating source code or artifacts, or using compromised agents as a pivot point for broader network access. The impact is most severe in shared or multi-tenant Jenkins instances where agent resources are valuable and workspace isolation is incomplete.
Affected systems
Jenkins Git client Plugin version 6.6.0 and all earlier versions are vulnerable. The vulnerability affects any Jenkins installation using this plugin on agents that process builds with user-controllable or externally-influenced workspace directory names. Jenkins controller versions and other plugins are not directly affected, but agents executing Git operations via the vulnerable plugin are the primary targets.
Exploitability
Exploitation requires authenticated access to Jenkins (CWE-78 via non-network vector indicates local/authenticated context). The attacker must either create a job with a malicious workspace name or influence an existing job's workspace path through Jenkins configuration features. The attack is not trivial—it depends on workspace naming being exposed to attacker control—but is reliable once that condition is met. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog, so active exploitation in the wild has not been confirmed as of the publication date.
Remediation
Update Jenkins Git client Plugin to a patched version that properly escapes workspace directory names in SSH wrapper script generation. Verify the specific patched version number against the official Jenkins security advisory and your plugin management system. As an interim mitigation, restrict job creation and workspace configuration permissions to trusted administrators, and isolate Jenkins agents that process untrusted jobs or external Git repositories.
Patch guidance
Consult the official Jenkins security advisory for CVE-2026-57282 to identify the minimum patched version. Most Jenkins deployments can update the Git client plugin through the Jenkins plugin manager (Manage Jenkins > Manage Plugins). Test the update in a non-production environment first, particularly if your workflows rely on custom workspace path logic. Verify that Git operations continue to function correctly after patching, and consider restarting agents to ensure the new plugin code is loaded.
Detection guidance
Monitor Jenkins agent logs for unusual shell command execution or SSH wrapper failures that contain special characters or unexpected command sequences in workspace paths. Examine Jenkins job configurations for workspace directory names that contain shell metacharacters (backticks, $(), pipes, semicolons, etc.). Review audit logs for job creation or workspace configuration changes made by unexpected users or service accounts. Consider blocking or alerting on workspace names that match patterns suspicious for command injection attempts.
Why prioritize this
This vulnerability warrants prompt patching in multi-tenant Jenkins environments or instances with significant external job submission, but is lower priority in tightly controlled, single-team deployments. The CVSS score of 5.0 reflects the authentication requirement and indirect control needed; however, the privilege-escalation and agent-compromise potential elevate its practical priority. Environments where workspace naming is exposed to untrusted users should treat this as higher priority.
Risk score, explained
The CVSS 3.1 score of 5.0 (Medium) is driven by: (1) Network-accessible attack vector but requiring authenticated access and high complexity; (2) Limited impact scope (confidentiality, integrity, and availability all rated as Low, affecting the single compromised agent rather than the broader system); (3) The requirement that an attacker must control workspace directory naming, which is not universally exposed. The score appropriately reflects moderate risk; however, context matters—the practical risk is higher in environments with weak workspace-naming controls.
Frequently asked questions
Can this vulnerability be exploited without authentication to Jenkins?
No. The CVSS vector indicates a requirement for prior authentication (PR:L). An attacker must have a valid Jenkins user account with sufficient permissions to create jobs or influence workspace paths.
Which Jenkins agents are at risk?
Agents that process builds using the vulnerable Git client plugin are at risk. The controller itself is not directly compromised. Agents that do not use the Git client plugin for any builds are not affected by this flaw.
What does the SSH wrapper script do, and why is it generated?
Jenkins Git client plugin generates a temporary SSH wrapper script to manage authentication and Git operations when cloning or pulling repositories. The wrapper must include the workspace path to enable proper Git directory management. Improper escaping of that path creates an injection point.
Is there a way to mitigate this without patching immediately?
Yes, restrict job creation and workspace path configuration to administrators only, and avoid running untrusted or externally-submitted jobs on shared agents. These controls reduce attack surface but do not eliminate the vulnerability; patching is the proper fix.
This analysis is based on the CVE record and does not constitute security advice. Organizations should verify patch availability and compatibility with their specific Jenkins configuration before deploying updates. CISA KEV status may change; refer to the official CISA KEV database for current active-exploitation data. For detailed patching and configuration guidance, consult the official Jenkins security advisory and your organization's vulnerability management policy. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10279MEDIUMOS Command Injection in wezterm-mcp 0.1.0
- CVE-2026-10544MEDIUMDevolutions Server PAM Command Injection Vulnerability
- CVE-2026-10805MEDIUMNetworkManager Local Privilege Escalation via Malformed MUD URL
- CVE-2026-11341MEDIUMD-Link DWR-M920 Command Injection Vulnerability – Patch & Detection Guide
- CVE-2026-11408MEDIUMOS Command Injection in vertex-app Log Viewer Endpoint
- CVE-2026-12814MEDIUMComfast CF-WR631AX V3 Command Injection Vulnerability
- CVE-2026-12815MEDIUMOS Command Injection in Coolify 4.0.0 Image Name Handler
- CVE-2026-25620MEDIUMArista NGFW Command Injection in Captive Portal (v17.4.0)