CVE-2023-51518: Apache James server Privilege Escalation Vulnerability
CRITICALCVE-2023-51518 is a CRITICAL (CVSS 9.8) privilege escalation vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Apache James server libraries in the Maven ecosystem. The issue involves privilege escalation via jmx pre-authentication deserialization. Remediation is available by upgrading affected packages to version 3.7.5, 3.8.1.
CVE-2023-51518 at a Glance
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).
How to Fix CVE-2023-51518
To remediate this vulnerability, upgrade all affected Apache James server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server</artifactId>
<version>3.7.5</version>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server</artifactId>
<version>3.8.1</version>
</dependency>
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-2023-51518, 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 James server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.5), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Apache James server, 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
CVE-2023-51518 Affected Apache James server Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.james:james-server
|
Maven |
< 3.7.5
|
3.7.5
|
|
org.apache.james:james-server
|
Maven |
≥ 3.8.0
< 3.8.1
|
3.8.1
|
References
Frequently Asked Questions
What is CVE-2023-51518?
Which Apache James server versions are affected?
What version fixes CVE-2023-51518?
Is james-server affected?
What is the CVSS score of CVE-2023-51518?
What CWE is associated with CVE-2023-51518?
How can I check Maven dependencies for CVE-2023-51518?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-px7w-c9gw-7gj3",
"modified" : "2024-08-23T13:43:46Z",
"published" : "2024-02-27T09:31:16Z",
"aliases" : [ "CVE-2023-51518" ],
"summary" : "Apache James server: Privilege escalation via JMX pre-authentication deserialization",
"details" : "Apache James prior to version 3.7.5 and 3.8.0 exposes a JMX endpoint on localhost subject to pre-authentication deserialisation of untrusted data.\nGiven a deserialisation gadjet, this could be leveraged as part of an exploit chain that could result in privilege escalation.\nNote that by default JMX endpoint is only bound locally.\n\nWe recommend users to:\n - Upgrade to a non-vulnerable Apache James version\n\n - Run Apache James isolated from other processes (docker - dedicated virtual machine)\n - If possible turn off JMX\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"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.james:james-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.7.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.7.4"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.james:james-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.8.0"
}, {
"fixed" : "3.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-51518"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/wbdm61ch6l0kzjn6nnfmyqlng82qz0or"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-27T23:00:04Z",
"nvd_published_at" : "2024-02-27T09:15:36Z"
}
}