Vulnerabilities in pkg:maven/org.apache.james/apache-mime4j-storage

PACKAGE
Advisory Identifier: GHSA-q84x-3476-8ff2
Advisory Summary

CVE-2022-45787 is a MODERATE (CVSS 5.5) apache james mime4j vulnerable to vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting Apache mime4j storage libraries in the Maven ecosystem. The issue involves apache james mime4j vulnerable to information disclosure to local users. Remediation is available by upgrading affected packages to version 0.8.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.james/apache-mime4j-storage

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.james/apache-mime4j-storage. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-q84x-3476-8ff2 CVE-2022-45787 MODERATE Apache James MIME4J vulnerable to information disclosure to local users

CVE-2022-45787 at a Glance

CVE Identifier CVE-2022-45787
GHSA Identifier GHSA-q84x-3476-8ff2
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product Apache mime4j storage
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.5

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:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2022-45787

To remediate this vulnerability, upgrade all affected Apache mime4j storage 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.james:apache-mime4j-storage fixed: 0.8.9
<dependency>
    <groupId>org.apache.james</groupId>
    <artifactId>apache-mime4j-storage</artifactId>
    <version>0.8.9</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.james

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.james 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-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In Apache mime4j storage, 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

Unproper laxist permissions on the temporary files used by MIME4J TempFileStorageProvider may lead to information disclosure to other local users. This issue affects Apache James MIME4J version 0.8.8 and prior versions. We recommend users to upgrade to MIME4j version 0.8.9 or later.

CVE-2022-45787 Affected Apache mime4j storage Versions

1 component(s)
Fixed Versions:
0.8.9
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.james:apache-mime4j-storage
Maven
< 0.8.9
0.8.9

References

Frequently Asked Questions

What is CVE-2022-45787?
CVE-2022-45787 is a security vulnerability in Apache mime4j storage involving Apache James MIME4J vulnerable to information disclosure to local users under CWE-312: Cleartext Storage of Sensitive Information.
Which Apache mime4j storage versions are affected?
Affected versions include releases prior to 0.8.9 across affected packages: org.apache.james:apache-mime4j-storage.
What version fixes CVE-2022-45787?
Upgrading to 0.8.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-mime4j-storage affected?
Yes, org.apache.james:apache-mime4j-storage is affected in releases prior to 0.8.9. Upgrade your dependency to 0.8.9 or later.
What is the CVSS score of CVE-2022-45787?
CVE-2022-45787 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-45787?
CVE-2022-45787 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check Maven dependencies for CVE-2022-45787?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.james'. 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-q84x-3476-8ff2",
  "modified" : "2023-01-12T16:49:59Z",
  "published" : "2023-01-06T12:31:34Z",
  "aliases" : [ "CVE-2022-45787" ],
  "summary" : "Apache James MIME4J vulnerable to information disclosure to local users",
  "details" : "Unproper laxist permissions on the temporary files used by MIME4J TempFileStorageProvider may lead to information disclosure to other local users. This issue affects Apache James MIME4J version 0.8.8 and prior versions. We recommend users to upgrade to MIME4j version 0.8.9 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.james:apache-mime4j-storage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-45787"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/james-mime4j/commit/021eb79ba312fe5a7f99fa867ee5350aa5533069"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/james-mime4j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/james-mime4j/blob/master/CHANGELOG.md#089---2022-12-30"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/MIME4J-322"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/26s8p9stl1z261c4qw15bsq03tt7t0rj"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-312" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-09T20:15:28Z",
    "nvd_published_at" : "2023-01-06T10:15:00Z"
  }
}