CVE-2026-57282
Jenkins vulnerability analysis and mitigation

Overview

CVE-2026-57282 is an OS command injection vulnerability in the Jenkins Git client Plugin (tracked as SECURITY-3723) that allows attackers who can control a build's working directory name to execute arbitrary operating system commands on Jenkins agents. It affects Git client Plugin versions 6.6.0 and earlier, specifically when the "Manually provided keys" Git Host Key Verification strategy is used on Unix agents. The vulnerability was disclosed on June 24, 2026, as part of a broader Jenkins security advisory. It carries a CVSS v3.1 base score of 5.0 (Medium) (Jenkins Advisory, GitHub Advisory).

Technical details

The root cause is improper neutralization of special elements in an OS command (CWE-78). The Git client Plugin embeds the workspace directory name directly into an SSH wrapper script generated by the "Manually provided keys" Git Host Key Verification strategy on Unix agents, without properly escaping shell metacharacters. An attacker who can influence the name of a build's working directory — for example, via a build parameter that controls the argument to the dir(…) Pipeline step — can inject shell command substitution sequences (e.g., $(command) or backtick expressions) into the directory name, causing arbitrary commands to execute on the agent when the SSH wrapper script is invoked. Exploitation is constrained to scenarios where the attacker controls the working directory name but does not already control the Pipeline script or the build scripts it executes (Jenkins Advisory).

Impact

Successful exploitation allows an attacker to execute arbitrary OS commands on the Jenkins build agent running the affected job, with the privileges of the Jenkins agent process. This can lead to partial compromise of confidentiality, integrity, and availability on the agent node — including exfiltration of secrets accessible to the agent, modification of build artifacts, or disruption of build processes. The impact is scoped to the agent and does not directly affect the Jenkins controller, but lateral movement from a compromised agent to other systems in the build environment is possible (Jenkins Advisory, GitHub Advisory).

Exploitation steps

  1. Identify a vulnerable target: Locate a Jenkins instance running Git client Plugin 6.6.0 or earlier on Unix agents, with the "Manually provided keys" Git Host Key Verification strategy configured for at least one job.
  2. Gain low-privilege access: Obtain Jenkins credentials with at least Item/Build permission on a job that uses the vulnerable configuration.
  3. Craft a malicious workspace directory name: Prepare a directory name containing shell command substitution, such as workspace$(malicious_command) or using backtick syntax, designed to execute a payload when interpreted by the shell.
  4. Trigger the vulnerable code path: Submit a build with the crafted directory name as a build parameter that controls the workspace path (e.g., via the dir(…) Pipeline step argument), ensuring the "Manually provided keys" SSH wrapper script generation is triggered.
  5. Achieve command execution: When the Git client Plugin generates the SSH wrapper script and embeds the unescaped directory name, the shell interprets the injected command substitution, executing arbitrary OS commands on the agent as the Jenkins agent process user (Jenkins Advisory).

Indicators of compromise

  • Logs: Jenkins build logs showing unexpected command output or errors within the Git SSH wrapper script execution phase; agent logs containing unusual process invocations during Git operations using the "Manually provided keys" strategy.
  • Process: Unexpected child processes spawned by the Jenkins agent process (e.g., sh, bash, curl, wget, python) with workspace directory names containing shell metacharacters ($, `, (, )).
  • File System: Presence of unexpected files or scripts in or near the Jenkins workspace directory; new cron jobs, SSH keys, or reverse shell scripts created by the Jenkins agent user account.
  • Network: Unusual outbound network connections from the Jenkins agent host to external IPs, particularly during or shortly after a Git checkout operation using the "Manually provided keys" strategy.

Mitigation and workarounds

Update the Jenkins Git client Plugin to version 6.6.1 or later, which resolves the vulnerability by storing the known_hosts file used by the "Manually provided keys" strategy in the system temporary directory, so the workspace directory name is no longer embedded in the SSH wrapper script path. As a workaround where immediate upgrade is not possible, avoid using the "Manually provided keys" Git Host Key Verification strategy on Unix agents, or restrict the ability of untrusted users to control workspace directory names via build parameters. Administrators should also audit Pipeline jobs for use of the dir(…) step with user-controlled inputs (Jenkins Advisory).

Community reactions

The vulnerability was disclosed as part of a large Jenkins security advisory on June 24, 2026, covering over 20 CVEs across multiple plugins. Security coverage aggregators such as CyberPress and VulDB noted the advisory, and the issue was picked up by the oss-security mailing list. No notable individual researcher commentary or significant social media discussion specific to CVE-2026-57282 has been identified beyond standard advisory syndication (Jenkins Advisory).

Additional resources


SourceThis report was generated using AI

Related Jenkins vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-57295MEDIUM5.4
  • Jenkins logoJenkins
  • jenkins
NoNoJun 24, 2026
CVE-2026-57294MEDIUM5.4
  • Jenkins logoJenkins
  • jenkins
NoNoJun 24, 2026
CVE-2026-57299MEDIUM4.3
  • Jenkins logoJenkins
  • jenkins
NoNoJun 24, 2026
CVE-2026-57297MEDIUM4.3
  • Jenkins logoJenkins
  • jenkins
NoNoJun 24, 2026
CVE-2026-57290MEDIUM4.3
  • Jenkins logoJenkins
  • jenkins
NoNoJun 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management