Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-57282

CVE-2026-57282: Jenkins Git Client Plugin RCE Vulnerability

CVE-2026-57282 is a remote code execution vulnerability in Jenkins Git client Plugin 6.6.0 and earlier. Attackers can exploit improper escaping in SSH wrapper scripts to execute arbitrary commands on agents.

Published:

CVE-2026-57282 Overview

CVE-2026-57282 is a command injection vulnerability [CWE-78] affecting Jenkins Git client Plugin version 6.6.0 and earlier. The plugin fails to correctly escape the workspace directory name when embedding it into a generated Secure Shell (SSH) wrapper script. Attackers who control the name of a build's working directory can execute arbitrary operating system commands on the Jenkins agent. The flaw requires authenticated access and specific conditions to exploit, but successful exploitation grants command execution in the agent context.

Critical Impact

Authenticated attackers with control over a build's working directory name can inject and execute arbitrary OS commands on Jenkins agents through the generated SSH wrapper script.

Affected Products

  • Jenkins Git client Plugin 6.6.0
  • Jenkins Git client Plugin versions prior to 6.6.0
  • Jenkins agents executing builds that use the affected plugin

Discovery Timeline

  • 2026-06-24 - Jenkins publishes Security Advisory SECURITY-3723
  • 2026-06-24 - CVE-2026-57282 published to NVD
  • 2026-06-25 - Last updated in NVD database

Technical Details for CVE-2026-57282

Vulnerability Analysis

The Git client Plugin generates an SSH wrapper script during Git operations that require SSH authentication. The plugin embeds the workspace directory name into this shell script without applying proper shell escaping. When the workspace directory name contains shell metacharacters, the script interprets them as command syntax rather than literal path data. This results in operating system command injection on the Jenkins agent executing the build.

The vulnerability is categorized under [CWE-78] (Improper Neutralization of Special Elements used in an OS Command). Exploitation requires the attacker to influence the workspace directory name, which is typically derived from job configuration or parameters. The attack complexity is elevated because the attacker must control workspace naming and trigger an SSH-backed Git operation.

Root Cause

The root cause is missing shell-quote escaping when constructing the SSH wrapper script. The plugin concatenates the workspace path into shell command strings rather than passing it as a properly quoted argument or through a safe templating mechanism. Shell metacharacters such as backticks, dollar-parentheses, and semicolons remain active in the generated script.

Attack Vector

An attacker with permission to configure jobs or influence build parameters supplies a malicious workspace directory name containing shell command substitution syntax. When Jenkins executes a Git operation requiring the SSH wrapper, the agent shell evaluates the injected commands. Refer to the Jenkins Security Advisory SECURITY-3723 for technical specifics.

Detection Methods for CVE-2026-57282

Indicators of Compromise

  • Unexpected child processes spawned by Jenkins agent Java processes during Git checkout operations
  • Workspace directory names containing shell metacharacters such as $(), backticks, or semicolons
  • SSH wrapper scripts in temporary directories containing unescaped workspace path strings
  • Outbound network connections from Jenkins agents that do not correlate with declared Git remotes

Detection Strategies

  • Audit Jenkins job configurations for workspace overrides containing shell metacharacters or unusual path syntax
  • Monitor process execution telemetry on Jenkins agents for shell invocations originating from Git plugin operations
  • Review Jenkins audit logs for job configuration changes that modify custom workspace settings
  • Inspect generated SSH wrapper scripts under the agent temporary directory for injected command sequences

Monitoring Recommendations

  • Enable verbose Jenkins build logging to capture full command lines passed to Git operations
  • Forward Jenkins controller and agent process telemetry to a centralized analytics platform for correlation
  • Alert on Git plugin SSH wrapper script generation events that include non-alphanumeric characters in path arguments
  • Track Jenkins plugin version inventory across all controllers to identify unpatched Git client Plugin instances

How to Mitigate CVE-2026-57282

Immediate Actions Required

  • Upgrade Jenkins Git client Plugin to a version later than 6.6.0 that addresses SECURITY-3723
  • Restrict job configuration permissions to trusted users only, applying least privilege through Jenkins authorization strategies
  • Audit existing jobs for custom workspace paths and remove any containing shell metacharacters
  • Isolate Jenkins agents on segmented networks to limit blast radius of agent-level command execution

Patch Information

Jenkins addressed CVE-2026-57282 in the Git client Plugin release that follows version 6.6.0. Review the Jenkins Security Advisory SECURITY-3723 for the fixed version and upgrade instructions. Apply the update through the Jenkins Plugin Manager and restart the controller to complete remediation.

Workarounds

  • Remove or disable the Git client Plugin on controllers where immediate patching is not feasible
  • Enforce workspace path policies that reject directory names containing shell metacharacters
  • Restrict the Job/Configure permission to limit who can set custom workspace locations
  • Run Jenkins agents under unprivileged service accounts to limit the impact of injected commands

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.