CVE-2022-45787 is a medium-severity (CVSS 5.5) CWE-312 vulnerability in org.apache.james:apache-mime4j-storage. A fix is available for org.apache.james:apache-mime4j-storage — see the affected versions and patch details below.
Apache James MIME4J vulnerable to information disclosure to local users
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-45787.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.apache.james:apache-mime4j-storageReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.james:apache-mime4j-storage | all versions | 0.8.9org.apache.james:apache-mime4j-storage:0.8.9 |
Affected Products
jamesapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.james:apache-mime4j-storage, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.james:apache-mime4j-storage to 0.8.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-45787 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat build of Quarkus 2.13.8.Final | org.apache.james/apache-mime4j-storage:0.8.9.redhat-00001 | RHSA-2023:3809 |
| Red Hat JBoss Enterprise Application Platform | org.apache.james/apache-mime4j-core:0.8.9.redhat-00001 | RHSA-2023:1516 |
| Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8 | eap7-activemq-artemis-native-1:1.0.2-3.redhat_00004.1.el8eap | RHSA-2023:1513 |
| Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 9 | eap7-activemq-artemis-native-1:1.0.2-3.redhat_00004.1.el9eap | RHSA-2023:1514 |
| Red Hat JBoss Enterprise Application Platform 7.4 on RHEL 7 | eap7-activemq-artemis-native-1:1.0.2-3.redhat_00004.1.el7eap | RHSA-2023:1512 |
| Red Hat Single Sign-On 7 | apache-james-mime4j | RHSA-2023:2713 |
| Red Hat Single Sign-On 7.6 for RHEL 7 | rh-sso7-keycloak-0:18.0.7-1.redhat_00001.1.el7sso | RHSA-2023:2705 |
| Red Hat Single Sign-On 7.6 for RHEL 8 | rh-sso7-keycloak-0:18.0.7-1.redhat_00001.1.el8sso | RHSA-2023:2706 |
Frequently Asked Questions
Is CVE-2022-45787 in your dependencies?
Find it across Maven, including transitive dependencies.