CVE-2012-0213: Poi Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-jqx5-h2hw-5q4f
CWE-400
Published
Advisory Summary

CVE-2012-0213 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Poi libraries in the Maven ecosystem. The issue involves denial of service in apache poi. Remediation is available by upgrading affected packages to version 3.10-beta1.

CVE-2012-0213 at a Glance

CVE Identifier CVE-2012-0213
GHSA Identifier GHSA-jqx5-h2hw-5q4f
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Poi
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2012-0213

To remediate this vulnerability, upgrade all affected Poi 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 fixed: 3.10-beta1
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.10-beta1</version>
</dependency>
org.apache.poi:poi-scratchpad fixed: 3.10-beta1
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-scratchpad</artifactId>
    <version>3.10-beta1</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-2012-0213, 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 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.10-beta1), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Poi, 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

The UnhandledDataStructure function in hwpf/model/UnhandledDataStructure.java in Apache POI 3.8 and earlier allows remote attackers to cause a denial of service (OutOfMemoryError exception and possibly JVM destabilization) via a crafted length value in a Channel Definition Format (CDF) or Compound File Binary Format (CFBF) document.

CVE-2012-0213 Affected Poi Versions

2 component(s)
Fixed Versions:
3.10-beta1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.poi:poi
Maven
< 3.10-beta1
3.10-beta1
org.apache.poi:poi-scratchpad
Maven
< 3.10-beta1
3.10-beta1

References

Frequently Asked Questions

What is CVE-2012-0213?
CVE-2012-0213 is a security vulnerability in Poi involving Denial of Service in Apache POI under CWE-400: Uncontrolled Resource Consumption.
Which Poi versions are affected?
Affected versions include releases prior to 3.10-beta1 across affected packages: org.apache.poi:poi, org.apache.poi:poi-scratchpad.
What version fixes CVE-2012-0213?
Upgrading to 3.10-beta1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is poi affected?
Yes, org.apache.poi:poi is affected in releases prior to 3.10-beta1. Upgrade your dependency to 3.10-beta1 or later.
Is poi-scratchpad affected?
Yes, org.apache.poi:poi-scratchpad is affected in releases prior to 3.10-beta1. Upgrade your dependency to 3.10-beta1 or later.
What CWE is associated with CVE-2012-0213?
CVE-2012-0213 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2012-0213?
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-jqx5-h2hw-5q4f",
  "modified" : "2024-03-05T18:57:35Z",
  "published" : "2022-05-04T00:28:50Z",
  "aliases" : [ "CVE-2012-0213" ],
  "summary" : "Denial of Service in Apache POI",
  "details" : "The UnhandledDataStructure function in hwpf/model/UnhandledDataStructure.java in Apache POI 3.8 and earlier allows remote attackers to cause a denial of service (OutOfMemoryError exception and possibly JVM destabilization) via a crafted length value in a Channel Definition Format (CDF) or Compound File Binary Format (CFBF) document.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.poi:poi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.10-beta1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.poi:poi-scratchpad"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.10-beta1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-0213"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/poi/commit/25bc679244188d63de690354db0e3f301291e252"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=799078"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/poi"
  }, {
    "type" : "WEB",
    "url" : "https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0044"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-August/084609.html"
  }, {
    "type" : "WEB",
    "url" : "http://www-01.ibm.com/support/docview.wss?uid=swg21996759"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2012/dsa-2468"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-13T18:56:25Z",
    "nvd_published_at" : "2012-08-07T21:55:00Z"
  }
}