CVE-2022-41954: Mpxj Temporary File Information Disclosure Vulnerability Vulnerability

LOW
Advisory Identifier: GHSA-jf2p-4gqj-849g
CVSS 2.8
CWE-668 CWE-200
Published
Advisory Summary

CVE-2022-41954 is a LOW (CVSS 2.8) temporary file information disclosure vulnerability vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Mpxj libraries in the Maven ecosystem. The issue involves temporary file information disclosure vulnerability in mpxj. Remediation is available by upgrading affected packages to version 10.14.1.

CVE-2022-41954 at a Glance

CVE Identifier CVE-2022-41954
GHSA Identifier GHSA-jf2p-4gqj-849g
Severity LOW
CVSS v3.1 Base Score 2.8
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Mpxj
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 2.8

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

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

How to Fix CVE-2022-41954

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

net.sf.mpxj:mpxj fixed: 10.14.1
<dependency>
    <groupId>net.sf.mpxj</groupId>
    <artifactId>mpxj</artifactId>
    <version>10.14.1</version>
</dependency>
net.sf.mpxj fixed: 10.14.1
Upgrade net.sf.mpxj to 10.14.1
net.sf.mpxj-for-csharp fixed: 10.14.1
Upgrade net.sf.mpxj-for-csharp to 10.14.1
net.sf.mpxj-for-vb fixed: 10.14.1
Upgrade net.sf.mpxj-for-vb to 10.14.1
mpxj fixed: 10.14.1
pip install mpxj>=10.14.1
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=net.sf.mpxj

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=net.sf.mpxj

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

Note: The mvn dependency:tree -Dincludes=net.sf.mpxj 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Mpxj, 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 On Unix-like operating systems (not Windows or macos), MPXJ's use of `File.createTempFile(..)` results in temporary files being created with the permissions `-rw-r--r--`. This means that any other user on the system can read the contents of this file. When MPXJ is reading a type of schedule file which requires the creation of a temporary file or directory, a knowledgeable local user could locate these transient files while they are in use and would then be able to read the schedule being processed by MPXJ. ### Patches The problem has been patched, MPXJ version 10.14.1 and later includes the necessary changes. ### Workarounds Setting `java.io.tmpdir` to a directory to which only the user running the application has access will prevent other users from accessing these temporary files. ### For more information If you have any questions or comments about this advisory * Open an issue in https://github.com/joniles/mpxj

CVE-2022-41954 Affected Mpxj Versions

5 component(s)
Fixed Versions:
10.14.1
Product / Package Ecosystem Affected Versions Fixed Version
net.sf.mpxj:mpxj
Maven
< 10.14.1
10.14.1
net.sf.mpxj
NuGet
< 10.14.1
10.14.1
net.sf.mpxj-for-csharp
NuGet
< 10.14.1
10.14.1
net.sf.mpxj-for-vb
NuGet
< 10.14.1
10.14.1
mpxj
PyPI
< 10.14.1
10.14.1

References

Frequently Asked Questions

What is CVE-2022-41954?
CVE-2022-41954 is a security vulnerability in Mpxj involving Temporary File Information Disclosure vulnerability in MPXJ under CWE-668: Exposure of Resource to Wrong Sphere.
Which Mpxj versions are affected?
Affected versions include releases prior to 10.14.1 across affected packages: net.sf.mpxj:mpxj, net.sf.mpxj, net.sf.mpxj-for-csharp, net.sf.mpxj-for-vb, mpxj.
What version fixes CVE-2022-41954?
Upgrading to 10.14.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mpxj affected?
Yes, net.sf.mpxj:mpxj is affected in releases prior to 10.14.1. Upgrade your dependency to 10.14.1 or later.
Is net.sf.mpxj affected?
Yes, net.sf.mpxj is affected in releases prior to 10.14.1. Upgrade your dependency to 10.14.1 or later.
What is the CVSS score of CVE-2022-41954?
CVE-2022-41954 has a CVSS v3.1 base score of 2.8 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-41954?
CVE-2022-41954 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check Maven dependencies for CVE-2022-41954?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=net.sf.mpxj'. 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-jf2p-4gqj-849g",
  "modified" : "2024-09-26T14:24:09Z",
  "published" : "2022-11-28T22:09:09Z",
  "aliases" : [ "CVE-2022-41954" ],
  "summary" : "Temporary File Information Disclosure vulnerability in MPXJ",
  "details" : "### Impact\nOn Unix-like operating systems (not Windows or macos), MPXJ's use of `File.createTempFile(..)` results in temporary files being created with the permissions `-rw-r--r--`. This means that any other user on the system can read the contents of this file. When MPXJ is reading a type of schedule file which requires the creation of a temporary file or directory, a knowledgeable local user could locate these transient files while they are in use and would then be able to read the schedule being processed by MPXJ.\n\n### Patches\nThe problem has been patched, MPXJ version 10.14.1 and later includes the necessary changes.\n\n### Workarounds\nSetting `java.io.tmpdir` to a directory to which only the user running the application has access will prevent other users from accessing these temporary files.\n\n### For more information\nIf you have any questions or comments about this advisory\n* Open an issue in https://github.com/joniles/mpxj\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "net.sf.mpxj:mpxj"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.14.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "net.sf.mpxj"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.14.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "net.sf.mpxj-for-csharp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.14.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "net.sf.mpxj-for-vb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.14.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mpxj"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.14.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/joniles/mpxj/security/advisories/GHSA-jf2p-4gqj-849g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41954"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/joniles/mpxj/commit/287ad0234213c52b0638565e14bd9cf3ed44cedd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/joniles/mpxj/commit/ae0af24345d79ad45705265d9927fe55e94a5721"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/joniles/mpxj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mpxj/PYSEC-2022-42996.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-668" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-28T22:09:09Z",
    "nvd_published_at" : "2022-11-25T19:15:00Z"
  }
}