CVE-2022-0839: Improper Restriction of XML External Entity Reference in Liquibase
Summary
CVE-2022-0839: Improper Restriction of XML External Entity Reference in Liquibase. Affects org.liquibase:liquibase-core versions < 4.8.0. Fixed in 4.8.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Liquibase is an open-source library used for database schema management. It provides a platform-independent way to define and execute database changes. The liquibase-core package, specifically, is a Maven package that contains the core functionality of Liquibase. It is widely used in software development projects to manage database migrations and version control.
This vulnerability in Liquibase arises from an improper restriction of XML external entity references in the XMLChangeLogSAXParser() function. This issue allows an attacker to exploit the XML parsing functionality and potentially gain unauthorized access to sensitive information or execute arbitrary code.
Vulnerability Detail
The vulnerability in Liquibase arises from an improper restriction of XML external entity references. The XMLChangeLogSAXParser() function, prior to version 4.8.0, does not properly validate and restrict external entity references in XML files. This allows an attacker to include malicious external entities in an XML file, leading to various attacks such as XML External Entity (XXE) attacks.
An attacker could exploit this vulnerability by crafting a specially crafted XML file and tricking the application into parsing it. This could result in the disclosure of sensitive information, denial of service, or remote code execution depending on the context and capabilities of the targeted system.
The Common Vulnerabilities and Exposures (CVE) identifier for this vulnerability is CVE-2022-0839. The vulnerability has a CVSS v3 score of 9.8, indicating its critical severity.
How To Fix
Latest published version: 5.0.4 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.8.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The vulnerability in Liquibase, identified as CVE-2022-0839, poses a critical risk due to the improper restriction of XML external entity references. It is crucial for developers to update their liquibase-core package to version 4.8.0 or later to mitigate the risk of exploitation. By following the recommended steps to fix the vulnerability and staying informed about potential security updates, developers can ensure the security and integrity of their software projects.
For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.liquibase:liquibase-core →
FAQ
Liquibase is an open-source library used for database schema management. It provides a platform-independent way to define and execute database changes, making it easier to manage database migrations and version control in software development projects.
The liquibase-core package is a Maven package that contains the core functionality of Liquibase. It is widely used in software development projects to integrate Liquibase and manage database migrations.
An XML External Entity (XXE) attack is a type of attack that exploits vulnerabilities in XML parsers. By including malicious external entities in an XML file, an attacker can potentially read sensitive information, perform denial of service attacks, or execute arbitrary code.
The CVSS v3 score of this vulnerability is 9.8, indicating its critical severity. This score reflects the potential impact and exploitability of the vulnerability.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert is a tool that monitors and alerts in real-time for open-source vulnerabilities in software, using just the pom.xml file without requiring access to the code or installation.