CVE-2021-21642

8.1 HIGH
XXE

📋 TL;DR

This vulnerability in Jenkins Config File Provider Plugin allows attackers to perform XML External Entity (XXE) attacks by exploiting improper XML parser configuration. Attackers can read arbitrary files from the Jenkins controller file system, potentially exposing sensitive data. Organizations using Jenkins with this plugin version 3.7.0 or earlier are affected.

💻 Affected Systems

Products:
  • Jenkins Config File Provider Plugin
Versions: 3.7.0 and earlier
Operating Systems: All platforms running Jenkins
Default Config Vulnerable: ⚠️ Yes
Notes: All installations using the vulnerable plugin versions are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of Jenkins controller with arbitrary file read, potentially exposing credentials, configuration files, and sensitive data stored on the server.

🟠

Likely Case

Unauthorized reading of sensitive files from the Jenkins controller file system, potentially exposing credentials, configuration data, and other sensitive information.

🟢

If Mitigated

Limited impact with proper network segmentation and access controls, though file read capability remains possible if exploited.

🌐 Internet-Facing: HIGH - Jenkins instances exposed to the internet are directly vulnerable to exploitation attempts.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability to escalate privileges or access sensitive data.

🎯 Exploit Status

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

Exploitation requires authenticated access to Jenkins, but the attack technique is well-documented and relatively simple to implement.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.7.1

Vendor Advisory: https://www.jenkins.io/security/advisory/2021-04-21/#SECURITY-2204

Restart Required: Yes

Instructions:

1. Update Jenkins Config File Provider Plugin to version 3.7.1 or later via Jenkins Plugin Manager. 2. Restart Jenkins to apply the update. 3. Verify the plugin version is updated in the Installed Plugins list.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily disable the Config File Provider Plugin if immediate patching is not possible

Navigate to Manage Jenkins > Manage Plugins > Installed tab > Find Config File Provider Plugin > Click Disable

Restrict plugin access

all

Limit which users can access the Config File Provider Plugin functionality

Configure Jenkins security matrix to restrict plugin access to trusted users only

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Jenkins from sensitive systems
  • Apply principle of least privilege to Jenkins service accounts and file system permissions

🔍 How to Verify

Check if Vulnerable:

Check plugin version in Jenkins: Manage Jenkins > Manage Plugins > Installed tab > Look for Config File Provider Plugin version

Check Version:

Check Jenkins plugin directory or use Jenkins CLI: java -jar jenkins-cli.jar -s http://jenkins-url/ list-plugins | grep 'Config File Provider'

Verify Fix Applied:

Verify plugin version is 3.7.1 or later in the Installed Plugins list

📡 Detection & Monitoring

Log Indicators:

  • Unusual XML parsing errors in Jenkins logs
  • Multiple failed authentication attempts followed by successful access to Config File Provider

Network Indicators:

  • Unusual outbound connections from Jenkins server after XML file uploads
  • Patterns of XML file uploads to Config File Provider endpoints

SIEM Query:

source="jenkins.log" AND ("Config File Provider" OR "XML parsing error" OR "XXE")

🔗 References

📤 Share & Export