CVE-2022-23640: Xlsx streamer Xlsx-streamer Vulnerability

CRITICAL
Advisory Identifier: GHSA-xvm2-9xvc-hx7f
CVSS 9.8
CWE-776 CWE-611
Published
Advisory Summary

CVE-2022-23640 is a CRITICAL (CVSS 9.8) xlsx-streamer vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Xlsx streamer libraries in the Maven ecosystem. The issue involves xlsx-streamer. Remediation is available by upgrading affected packages to version 2.1.0.

CVE-2022-23640 at a Glance

CVE Identifier CVE-2022-23640
GHSA Identifier GHSA-xvm2-9xvc-hx7f
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Xlsx streamer
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-23640

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

com.monitorjbl:xlsx-streamer fixed: 2.1.0
<dependency>
    <groupId>com.monitorjbl</groupId>
    <artifactId>xlsx-streamer</artifactId>
    <version>2.1.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=com.monitorjbl

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.monitorjbl

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

Note: The mvn dependency:tree -Dincludes=com.monitorjbl 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-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Xlsx streamer, 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

### Impact Prior to xlsx-streamer 2.1.0, the XML parser that was used did not apply all the necessary settings to prevent XML Entity Expansion issues. ### Patches Upgrade to version 2.1.0. ### Workarounds No known workaround. ### References https://github.com/monitorjbl/excel-streaming-reader/commit/0749c7b9709db078ccdeada16d46a34bc2910c73 ### For more information If you have any questions or comments about this advisory: * Open an issue in [monitorjbl/excel-streaming-reader](https://github.com/monitorjbl/excel-streaming-reader)

CVE-2022-23640 Affected Xlsx streamer Versions

1 component(s)
Fixed Versions:
2.1.0
Product / Package Ecosystem Affected Versions Fixed Version
com.monitorjbl:xlsx-streamer
Maven
< 2.1.0
2.1.0

References

Frequently Asked Questions

What is CVE-2022-23640?
CVE-2022-23640 is a security vulnerability in Xlsx streamer involving xlsx-streamer under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Xlsx streamer versions are affected?
Affected versions include releases prior to 2.1.0 across affected packages: com.monitorjbl:xlsx-streamer.
What version fixes CVE-2022-23640?
Upgrading to 2.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xlsx-streamer affected?
Yes, com.monitorjbl:xlsx-streamer is affected in releases prior to 2.1.0. Upgrade your dependency to 2.1.0 or later.
What is the CVSS score of CVE-2022-23640?
CVE-2022-23640 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-23640?
CVE-2022-23640 is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') (The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.).
How can I check Maven dependencies for CVE-2022-23640?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.monitorjbl'. 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-xvm2-9xvc-hx7f",
  "modified" : "2022-03-10T15:48:44Z",
  "published" : "2022-03-02T21:30:54Z",
  "aliases" : [ "CVE-2022-23640" ],
  "summary" : "Improper Restriction of XML External Entity Reference in com.monitorjbl:xlsx-streamer",
  "details" : "### Impact\nPrior to xlsx-streamer 2.1.0, the XML parser that was used did not apply all the necessary settings to prevent XML Entity Expansion issues.\n\n### Patches\nUpgrade to version 2.1.0.\n\n### Workarounds\nNo known workaround.\n\n### References\nhttps://github.com/monitorjbl/excel-streaming-reader/commit/0749c7b9709db078ccdeada16d46a34bc2910c73\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [monitorjbl/excel-streaming-reader](https://github.com/monitorjbl/excel-streaming-reader)\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.monitorjbl:xlsx-streamer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/monitorjbl/excel-streaming-reader/security/advisories/GHSA-xvm2-9xvc-hx7f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23640"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/monitorjbl/excel-streaming-reader/commit/0749c7b9709db078ccdeada16d46a34bc2910c73"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/monitorjbl/excel-streaming-reader"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611", "CWE-776" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-02T21:30:54Z",
    "nvd_published_at" : "2022-03-02T20:15:00Z"
  }
}