CVE-2021-21652

7.1 HIGH

📋 TL;DR

This CSRF vulnerability in Jenkins Xray plugin allows attackers to trick authenticated users into unknowingly connecting Jenkins to attacker-controlled URLs using stolen credential IDs. This could expose sensitive credentials stored in Jenkins. Affects Jenkins administrators using Xray Test Management for Jira plugin version 2.4.0 or earlier.

💻 Affected Systems

Products:
  • Jenkins Xray - Test Management for Jira Plugin
Versions: 2.4.0 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires Jenkins with Xray plugin installed and at least one user with administrative privileges.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers capture all credentials stored in Jenkins, potentially gaining access to integrated systems like databases, cloud services, and internal infrastructure.

🟠

Likely Case

Attackers capture specific credentials used by the Xray plugin, compromising Jira integration and potentially other systems using those credentials.

🟢

If Mitigated

With proper CSRF protections and credential management, impact is limited to failed connection attempts to attacker URLs.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Requires attacker to obtain credential IDs through other means and trick authenticated admin into visiting malicious page.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.4.1

Vendor Advisory: https://www.jenkins.io/security/advisory/2021-05-11/#SECURITY-2251%20%281%29

Restart Required: Yes

Instructions:

1. Update Jenkins Xray plugin to version 2.4.1 or later via Jenkins Plugin Manager. 2. Restart Jenkins service. 3. Verify plugin version in Installed Plugins list.

🔧 Temporary Workarounds

Enable CSRF Protection

all

Ensure Jenkins CSRF protection is enabled globally

Check 'Prevent Cross Site Request Forgery exploits' is enabled in Jenkins > Configure Global Security

Restrict Admin Access

all

Limit administrative access to trusted users only

Configure role-based access control in Jenkins > Configure Global Security

🧯 If You Can't Patch

  • Disable or uninstall Xray plugin if not essential
  • Implement network segmentation to isolate Jenkins from sensitive systems

🔍 How to Verify

Check if Vulnerable:

Check installed plugin version in Jenkins > Manage Jenkins > Manage Plugins > Installed tab

Check Version:

Check Jenkins web interface or plugin manifest file

Verify Fix Applied:

Verify Xray plugin version is 2.4.1 or higher in Installed Plugins list

📡 Detection & Monitoring

Log Indicators:

  • Unexpected connection attempts to external URLs in Jenkins logs
  • Failed authentication attempts from Xray plugin

Network Indicators:

  • Outbound connections from Jenkins to unfamiliar domains on port 443

SIEM Query:

source="jenkins.log" AND ("Xray" OR "test.management") AND ("connection" OR "credential")

🔗 References

📤 Share & Export