CVE-2022-23118

8.8 HIGH

📋 TL;DR

This vulnerability in Jenkins Debian Package Builder Plugin allows attackers who control Jenkins agent processes to execute arbitrary operating system commands on the Jenkins controller. Attackers can specify a malicious path to the git command-line tool, leading to remote code execution. Organizations using vulnerable versions of the plugin with untrusted agents are affected.

💻 Affected Systems

Products:
  • Jenkins Debian Package Builder Plugin
Versions: 1.6.11 and earlier
Operating Systems: All operating systems where Jenkins runs
Default Config Vulnerable: ⚠️ Yes
Notes: Requires attacker control of agent processes; more dangerous in environments with untrusted or compromised agents.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the Jenkins controller with attacker gaining full control over the system, potentially leading to data theft, lateral movement, or deployment of malware.

🟠

Likely Case

Unauthorized command execution on the Jenkins controller, allowing attackers to access sensitive build artifacts, credentials, or modify build processes.

🟢

If Mitigated

Limited impact if proper agent isolation and access controls are implemented, restricting the ability to control agent processes.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires control of agent processes; public exploit details exist in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.6.12

Vendor Advisory: https://www.jenkins.io/security/advisory/2022-01-12/#SECURITY-2546

Restart Required: Yes

Instructions:

1. Update Jenkins Debian Package Builder Plugin to version 1.6.12 or later via Jenkins Plugin Manager. 2. Restart Jenkins to apply the update. 3. Verify the plugin version in the Installed Plugins list.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily disable the Debian Package Builder Plugin if immediate patching is not possible.

Navigate to Jenkins > Manage Jenkins > Manage Plugins > Installed tab, find 'Debian Package Builder Plugin', click 'Disable'

Restrict agent access

all

Implement strict access controls and monitoring for Jenkins agents to prevent unauthorized control.

🧯 If You Can't Patch

  • Isolate Jenkins agents in restricted network segments with minimal access to the controller.
  • Implement strict monitoring and alerting for unusual agent behavior or command execution patterns.

🔍 How to Verify

Check if Vulnerable:

Check the plugin version in Jenkins: Navigate to Manage Jenkins > Manage Plugins > Installed tab, look for 'Debian Package Builder Plugin' and verify version is 1.6.11 or earlier.

Check Version:

curl -s http://jenkins-url/pluginManager/api/json?depth=1 | jq '.plugins[] | select(.shortName=="debian-package-builder") | .version'

Verify Fix Applied:

After updating, verify the plugin version shows 1.6.12 or later in the Installed Plugins list.

📡 Detection & Monitoring

Log Indicators:

  • Unusual git command executions from agents, especially with non-standard paths
  • Suspicious process creation events on the Jenkins controller originating from agent connections

Network Indicators:

  • Unexpected outbound connections from Jenkins controller to external systems following agent interactions

SIEM Query:

source="jenkins.log" AND ("git" AND "path" AND "agent") OR ("Debian Package Builder" AND "command")

🔗 References

📤 Share & Export