CVE-2019-12415: Apache POI - Improper Restriction of XML External Entity Reference

org.apache.poi:poi Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.5

CVE-2019-12415: Improper Restriction of XML External Entity Reference in Apache POI. Affects org.apache.poi:poi versions < 4.1.1. Fixed in 4.1.1. How to fix ↓

Also tracked for

The same CVE-2019-12415 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache POI is a popular Java library used for reading and writing Microsoft Office file formats, including Excel documents. It provides APIs to manipulate and extract data from these files. However, versions up to 4.1.0 of Apache POI are vulnerable to an XML External Entity (XXE) Processing issue when converting user-provided Excel documents using the XSSFExportToXml tool. This vulnerability allows an attacker to read files from the local filesystem or internal network resources.

Vulnerability Detail

The vulnerability arises due to improper restriction of XML external entity references. An attacker can exploit this by crafting a malicious Excel document that includes specially crafted XML entities. When the document is processed by the XSSFExportToXml tool, the XXE vulnerability is triggered, allowing the attacker to read sensitive files or internal network resources. This can lead to unauthorized access to sensitive information or facilitate further attacks.

How To Fix

Minimum fixed version

4.1.1

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 →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the XSSFExportToXml tool or restrict its usage to trusted sources. This can be achieved by modifying the code that invokes the XSSFExportToXml tool or by implementing input validation to ensure that only trusted Excel documents are processed.

Conclusion

The CVE-2019-12415 vulnerability in Apache POI allows an attacker to read files from the local filesystem or internal network resources by exploiting an XML External Entity (XXE) Processing issue. Upgrading to Apache POI version 4.1.1 or later is the recommended solution. If immediate upgrade is not possible, disabling or restricting the usage of the XSSFExportToXml tool can serve as a temporary workaround. For further assistance on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for org.apache.poi:poi →

Share this vulnerability

FAQ

Apache POI is a Java library for working with Microsoft Office file formats, including Excel documents. It provides APIs to read, write, and manipulate these files.

XML External Entity (XXE) Processing is a vulnerability that allows an attacker to read files from the local filesystem or internal network resources by exploiting XML entity references.

The CVE-2019-12415 vulnerability affects Apache POI versions up to 4.1.0. It allows an attacker to read sensitive files or internal network resources by crafting a malicious Excel document and exploiting the XXE vulnerability in the XSSFExportToXml tool.

The potential consequences of this vulnerability include unauthorized access to sensitive information stored in files on the local filesystem or internal network resources. This can lead to data breaches, exposure of sensitive data, or further exploitation of the compromised system.

To mitigate the CVE-2019-12415 vulnerability, it is recommended to upgrade to Apache POI version 4.1.1 or later. Alternatively, you can disable or restrict the usage of the XSSFExportToXml tool in your application until the upgrade is performed.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.poi:poi.

How To Fix

Minimum fixed version

4.1.1

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback