CVE-2022-0839

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to perform XML External Entity (XXE) attacks through Liquibase, potentially leading to sensitive data disclosure, server-side request forgery, or denial of service. It affects all users running Liquibase versions before 4.8.0 who process untrusted XML input.

💻 Affected Systems

Products:
  • Liquibase
Versions: All versions prior to 4.8.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerable when processing XML changelog files from untrusted sources. Database migration tools often process XML from various origins.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through file disclosure, SSRF to internal services, or denial of service via entity expansion attacks.

🟠

Likely Case

Sensitive configuration file disclosure (database credentials, API keys) or limited SSRF to internal network services.

🟢

If Mitigated

No impact if XML parsing is properly configured to disable external entity resolution.

🌐 Internet-Facing: MEDIUM - Requires XML input processing capability, which may not be directly internet-facing in typical Liquibase deployments.
🏢 Internal Only: HIGH - Internal systems processing untrusted XML from various sources (CI/CD pipelines, developer workstations) are vulnerable.

🎯 Exploit Status

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

XXE exploitation is well-documented with many public tools. The vulnerability requires XML input processing but no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.8.0 and later

Vendor Advisory: https://github.com/liquibase/liquibase/security/advisories/GHSA-2q89-6c5v-5g5c

Restart Required: No

Instructions:

1. Update Liquibase to version 4.8.0 or later. 2. Update dependency in your project: For Maven: <liquibase.version>4.8.0</liquibase.version>. For Gradle: liquibase '4.8.0'. 3. Rebuild and redeploy applications using Liquibase.

🔧 Temporary Workarounds

Disable XXE in XML parser

all

Configure XML parser to disable external entity resolution before processing untrusted XML

Set XML parser properties: FEATURE_SECURE_PROCESSING=true, disallow-doctype-decl=true

Input validation

all

Validate and sanitize XML input before processing with Liquibase

🧯 If You Can't Patch

  • Restrict XML input sources to trusted repositories only
  • Implement network segmentation to limit SSRF impact

🔍 How to Verify

Check if Vulnerable:

Check Liquibase version: liquibase --version. If version is below 4.8.0, you are vulnerable.

Check Version:

liquibase --version

Verify Fix Applied:

Confirm version is 4.8.0 or higher: liquibase --version. Test with known XXE payloads to ensure they are rejected.

📡 Detection & Monitoring

Log Indicators:

  • XML parsing errors mentioning external entities
  • Unexpected file read operations
  • Outbound connections to internal services from Liquibase process

Network Indicators:

  • Liquibase process making unexpected HTTP requests to internal services
  • Data exfiltration patterns from database servers

SIEM Query:

process_name:"liquibase" AND (event_type:"file_read" OR dest_ip:private_ip_range)

🔗 References

📤 Share & Export