CVE-2022-25175

8.8 HIGH

📋 TL;DR

This vulnerability in Jenkins Pipeline: Multibranch Plugin allows attackers with Item/Configure permission to execute arbitrary operating system commands on the Jenkins controller by exploiting shared checkout directories in the readTrusted step. It affects Jenkins instances using the vulnerable plugin versions, potentially leading to complete system compromise.

💻 Affected Systems

Products:
  • Jenkins Pipeline: Multibranch Plugin
Versions: 706.vd43c65dec013 and earlier
Operating Systems: All platforms running Jenkins
Default Config Vulnerable: ⚠️ Yes
Notes: Requires Item/Configure permission to exploit. Jenkins instances using the vulnerable plugin with multibranch pipelines are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of the Jenkins controller with attacker gaining root/system-level access, allowing data theft, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Attackers with Item/Configure permission execute commands to steal credentials, modify pipelines, or deploy malware within the Jenkins environment.

🟢

If Mitigated

Limited impact if proper access controls restrict Item/Configure permissions to trusted administrators only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires Item/Configure permission but is straightforward once that access is obtained. The vulnerability is in the SCM checkout directory handling.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 707.vddb_a_714a_ff24 and later

Vendor Advisory: https://www.jenkins.io/security/advisory/2022-02-15/#SECURITY-2463

Restart Required: Yes

Instructions:

1. Update Jenkins Pipeline: Multibranch Plugin to version 707.vddb_a_714a_ff24 or later via Jenkins Plugin Manager. 2. Restart Jenkins to apply the update. 3. Verify the plugin version in Manage Jenkins > Manage Plugins.

🔧 Temporary Workarounds

Restrict Item/Configure Permissions

all

Limit Item/Configure permissions to only trusted administrators to prevent exploitation.

Configure Jenkins security matrix to restrict permissions

Disable Vulnerable Plugin

all

Temporarily disable the Pipeline: Multibranch Plugin if not essential.

Manage Jenkins > Manage Plugins > Installed > Pipeline: Multibranch Plugin > Disable

🧯 If You Can't Patch

  • Implement strict access controls to limit Item/Configure permissions to minimal trusted users only.
  • Monitor Jenkins logs for suspicious SCM checkout activities and command execution attempts.

🔍 How to Verify

Check if Vulnerable:

Check plugin version in Jenkins web interface: Manage Jenkins > Manage Plugins > Installed > Pipeline: Multibranch Plugin. If version is 706.vd43c65dec013 or earlier, you are vulnerable.

Check Version:

curl -s http://jenkins-host/pluginManager/api/json?depth=1 | grep -o '"shortName":"pipeline-multibranch-defaults","version":"[^"]*"'

Verify Fix Applied:

Verify plugin version is 707.vddb_a_714a_ff24 or later in Manage Jenkins > Manage Plugins > Installed.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SCM checkout patterns in Jenkins logs
  • Unexpected OS command execution in pipeline logs
  • Failed permission attempts for Item/Configure actions

Network Indicators:

  • Unusual outbound connections from Jenkins controller to external systems

SIEM Query:

source="jenkins.log" AND ("readTrusted" OR "checkout" OR "SCM") AND ("command" OR "exec" OR "Runtime.getRuntime")

🔗 References

📤 Share & Export