CVE-2023-23926: Apoc core XML External Entity (XXE) Vulnerability Vulnerability
MODERATECVE-2023-23926 is a MODERATE (CVSS 5.9) xml external entity (xxe) vulnerability vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Apoc core libraries in the Maven ecosystem. The issue involves xml external entity (xxe) vulnerability in apoc.import.graphml. Remediation is available by upgrading affected packages to version 5.5.0, 4.4.0.14.
CVE-2023-23926 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H).
How to Fix CVE-2023-23926
To remediate this vulnerability, upgrade all affected Apoc core 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.neo4j.procedure</groupId>
<artifactId>apoc-core</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>org.neo4j.procedure</groupId>
<artifactId>apoc-core</artifactId>
<version>4.4.0.14</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.neo4j.procedure
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-23926, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.neo4j.procedure
Analyze the terminal output to locate any version of Apoc core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.neo4j.procedure 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Apoc core, 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-23926 Affected Apoc core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.neo4j.procedure:apoc-core
|
Maven |
≥ 5.0.0
< 5.5.0
|
5.5.0
|
|
org.neo4j.procedure:apoc-core
|
Maven |
< 4.4.0.14
|
4.4.0.14
|
References
Frequently Asked Questions
What is CVE-2023-23926?
Which Apoc core versions are affected?
What version fixes CVE-2023-23926?
Is apoc-core affected?
What is the CVSS score of CVE-2023-23926?
What CWE is associated with CVE-2023-23926?
How can I check Maven dependencies for CVE-2023-23926?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6wxg-wh7f-rqpr",
"modified" : "2023-04-14T21:35:17Z",
"published" : "2023-02-16T20:46:49Z",
"aliases" : [ "CVE-2023-23926" ],
"summary" : "XML External Entity (XXE) vulnerability in apoc.import.graphml",
"details" : "### Impact\nA XML External Entity (XXE) vulnerability found in the apoc.import.graphml procedure of APOC core plugin in Neo4j graph database. XML External Entity (XXE) injection occurs when the XML parser allows external entities to be resolved. The XML parser used by the apoc.import.graphml procedure was not configured in a secure way and therefore allowed this. \n\nExternal entities can be used to read local files, send HTTP requests, and perform denial-of-service attacks on the application.\n\nAbusing the XXE vulnerability enabled assessors to read local files remotely. Although with the level of privileges assessors had this was limited to one-line files. With the ability to write to the database, any file could have been read. Additionally, assessors noted, with local testing, the server could be crashed by passing in improperly formatted XML. \n\n### Patches\nThe users should aim to use the latest released version compatible with their Neo4j version. The minimum versions containing patch for this vulnerability is 5.5.0. \n\n### Workarounds\nIf you cannot upgrade the library, you can control the [allowlist](https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/#config_dbms.security.procedures.allowlist) of the procedures that can be used in your system.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [neo4j-apoc](https://github.com/neo4j/apoc)\n* Email us at [security@neo4j.com](mailto:security@neo4j.com)\n\n### Credits\nWe want to publicly recognise the contribution of Christopher Schneider – State Farm.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.neo4j.procedure:apoc-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.5.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.neo4j.procedure:apoc-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.4.0.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/neo4j/apoc/security/advisories/GHSA-6wxg-wh7f-rqpr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-23926"
}, {
"type" : "WEB",
"url" : "https://github.com/neo4j/apoc/pull/310"
}, {
"type" : "WEB",
"url" : "https://github.com/neo4j/apoc/commit/f175f1f1f663d29fc151c297b56d154255eb7016"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/neo4j/apoc"
}, {
"type" : "WEB",
"url" : "https://github.com/neo4j/apoc/releases/tag/5.5.0"
}, {
"type" : "WEB",
"url" : "https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/#config_dbms.security.procedures.allowlist"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-16T20:46:49Z",
"nvd_published_at" : "2023-02-16T16:15:00Z"
}
}