CVE-2025-31672: Poi ooxml Apache POI OOXML Vulnerable To Vulnerability

MODERATE
Advisory Identifier: GHSA-gmg8-593g-7mv3
CVSS 5.3
CWE-20
Published
Advisory Summary

CVE-2025-31672 is a MODERATE (CVSS 5.3) apache poi ooxml vulnerable to vulnerability (CWE-20: Improper Input Validation) affecting Poi ooxml libraries in the Maven ecosystem. The issue involves apache poi ooxml vulnerable to improper input validation in ooxml file parsing. Remediation is available by upgrading affected packages to version 5.4.0.

CVE-2025-31672 at a Glance

CVE Identifier CVE-2025-31672
GHSA Identifier GHSA-gmg8-593g-7mv3
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Poi ooxml
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-31672

To remediate this vulnerability, upgrade all affected Poi ooxml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.poi:poi-ooxml fixed: 5.4.0
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>5.4.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.poi

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-31672, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.poi

Analyze the terminal output to locate any version of Poi ooxml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.poi command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Poi ooxml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Improper Input Validation vulnerability in Apache POI. The issue affects the parsing of OOXML format files like xlsx, docx and pptx. These file formats are basically zip files and it is possible for malicious users to add zip entries with duplicate names (including the path) in the zip. In this case, products reading the affected file could read different data because 1 of the zip entries with the duplicate name is selected over another but different products may choose a different zip entry. This issue affects Apache POI poi-ooxml before 5.4.0. poi-ooxml 5.4.0 has a check that throws an exception if zip entries with duplicate file names are found in the input file. Users are recommended to upgrade to version poi-ooxml 5.4.0, which fixes the issue. Please read https://poi.apache.org/security.html for recommendations about how to use the POI libraries securely.

CVE-2025-31672 Affected Poi ooxml Versions

1 component(s)
Fixed Versions:
5.4.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.poi:poi-ooxml
Maven
< 5.4.0
5.4.0

References

Frequently Asked Questions

What is CVE-2025-31672?
CVE-2025-31672 is a security vulnerability in Poi ooxml involving Apache POI OOXML Vulnerable to Improper Input Validation in OOXML File Parsing under CWE-20: Improper Input Validation.
Which Poi ooxml versions are affected?
Affected versions include releases prior to 5.4.0 across affected packages: org.apache.poi:poi-ooxml.
What version fixes CVE-2025-31672?
Upgrading to 5.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is poi-ooxml affected?
Yes, org.apache.poi:poi-ooxml is affected in releases prior to 5.4.0. Upgrade your dependency to 5.4.0 or later.
What is the CVSS score of CVE-2025-31672?
CVE-2025-31672 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2025-31672?
CVE-2025-31672 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2025-31672?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.poi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gmg8-593g-7mv3",
  "modified" : "2025-05-23T15:31:06Z",
  "published" : "2025-04-09T12:30:24Z",
  "aliases" : [ "CVE-2025-31672" ],
  "summary" : "Apache POI OOXML Vulnerable to Improper Input Validation in OOXML File Parsing",
  "details" : "Improper Input Validation vulnerability in Apache POI. The issue affects the parsing of OOXML format files like xlsx, docx and pptx. These file formats are basically zip files and it is possible for malicious users to add zip entries with duplicate names (including the path) in the zip. In this case, products reading the affected file could read different data because 1 of the zip entries with the duplicate name is selected over another but different products may choose a different zip entry.\nThis issue affects Apache POI poi-ooxml before 5.4.0. poi-ooxml 5.4.0 has a check that throws an exception if zip entries with duplicate file names are found in the input file.\nUsers are recommended to upgrade to version poi-ooxml 5.4.0, which fixes the issue. Please read  https://poi.apache.org/security.html  for recommendations about how to use the POI libraries securely.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.poi:poi-ooxml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-31672"
  }, {
    "type" : "WEB",
    "url" : "https://bz.apache.org/bugzilla/show_bug.cgi?id=69620"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/poi"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/k14w8vcjqy4h34hh5kzldko78kpylkq5"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250523-0004"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/04/08/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-10T13:46:10Z",
    "nvd_published_at" : "2025-04-09T12:15:15Z"
  }
}