CVE-2022-25205

8.8 HIGH

📋 TL;DR

This CSRF vulnerability in Jenkins dbCharts Plugin allows attackers to trick authenticated users into making unauthorized database connections via JDBC using attacker-controlled credentials. Attackers can also probe for class availability in the Jenkins instance. This affects all Jenkins instances running dbCharts Plugin version 0.5.2 or earlier.

💻 Affected Systems

Products:
  • Jenkins dbCharts Plugin
Versions: 0.5.2 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the dbCharts Plugin to be installed and enabled. Attack requires tricking an authenticated user into visiting a malicious page.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could connect Jenkins to malicious databases, potentially leading to data exfiltration, credential theft, or further exploitation through JDBC driver vulnerabilities.

🟠

Likely Case

Attackers could abuse database connections to steal sensitive data, perform reconnaissance on the Jenkins environment, or use the Jenkins instance as a pivot point for lateral movement.

🟢

If Mitigated

With proper CSRF protections and network segmentation, impact is limited to unauthorized database connections that may be detected and blocked.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires social engineering to trick authenticated users, but the technical complexity is low once user interaction is achieved.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.5.3 or later

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

Restart Required: Yes

Instructions:

1. Update Jenkins dbCharts Plugin to version 0.5.3 or later via Jenkins Plugin Manager. 2. Restart Jenkins service after update. 3. Verify plugin version in Manage Jenkins > Manage Plugins.

🔧 Temporary Workarounds

Disable dbCharts Plugin

all

Temporarily disable the vulnerable plugin until patching is possible

Navigate to Manage Jenkins > Manage Plugins > Installed tab, find dbCharts Plugin, click Disable

Enable CSRF Protection

all

Ensure Jenkins CSRF protection is enabled globally

Navigate to Manage Jenkins > Configure Global Security > Enable 'Prevent Cross Site Request Forgery exploits'

🧯 If You Can't Patch

  • Implement strict network segmentation to limit database connections from Jenkins instances
  • Use web application firewalls (WAF) with CSRF protection rules and monitor for suspicious JDBC connection attempts

🔍 How to Verify

Check if Vulnerable:

Check installed plugin version via Manage Jenkins > Manage Plugins > Installed tab, look for dbCharts Plugin version 0.5.2 or earlier

Check Version:

curl -s http://jenkins-host/pluginManager/api/json?depth=1 | grep -o '"dbCharts":{[^}]*"version":"[^"]*"'

Verify Fix Applied:

Verify dbCharts Plugin version is 0.5.3 or later in Manage Jenkins > Manage Plugins > Installed tab

📡 Detection & Monitoring

Log Indicators:

  • Unexpected JDBC connection attempts in Jenkins logs
  • Failed authentication attempts to databases from Jenkins
  • CSRF token validation failures

Network Indicators:

  • Outbound database connections from Jenkins to unexpected hosts/ports
  • JDBC traffic to non-standard databases

SIEM Query:

source="jenkins.log" AND ("JDBC" OR "database connection" OR "CSRF")

🔗 References

📤 Share & Export