GHSA-9vx8-f5c4-862x: Apoc XML External Entity (XXE) Vulnerability Vulnerability

MODERATE
CVSS 5.9
CWE-611
Published
Advisory Summary

GHSA-9vx8-f5c4-862x is a MODERATE (CVSS 5.9) xml external entity (xxe) vulnerability vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Apoc 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 4.4.0.14, 5.5.0.

GHSA-9vx8-f5c4-862x at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9vx8-f5c4-862x
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Apoc
Package Ecosystem Maven
Published Date
Last Updated

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).

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

How to Fix GHSA-9vx8-f5c4-862x

To remediate this vulnerability, upgrade all affected Apoc 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.neo4j.procedure:apoc fixed: 4.4.0.14
<dependency>
    <groupId>org.neo4j.procedure</groupId>
    <artifactId>apoc</artifactId>
    <version>4.4.0.14</version>
</dependency>
org.neo4j.procedure:apoc fixed: 5.5.0
<dependency>
    <groupId>org.neo4j.procedure</groupId>
    <artifactId>apoc</artifactId>
    <version>5.5.0</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.neo4j.procedure

How to Check if You Are Affected

To determine whether your Java application is affected by GHSA-9vx8-f5c4-862x, 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 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.0.14), 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, 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 A 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. External entities can be used to read local files, send HTTP requests, and perform denial-of-service attacks on the application. Abusing 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. ### Patches The users should aim to use the latest released version compatible with their Neo4j version. The minimum versions containing patch for this vulnerability is 4.4.0.14. ### Workarounds If 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. ### For more information If you have any questions or comments about this advisory: * Open an issue in [neo4j-apoc-procedures](https://github.com/neo4j-contrib/neo4j-apoc-procedures) * Email us at [security@neo4j.com](mailto:security@neo4j.com) ### Credits We want to publicly recognise the contribution of Christopher Schneider – State Farm.

GHSA-9vx8-f5c4-862x Affected Apoc Versions

2 component(s)
Fixed Versions:
4.4.0.145.5.0
Product / Package Ecosystem Affected Versions Fixed Version
org.neo4j.procedure:apoc
Maven
< 4.4.0.14
4.4.0.14
org.neo4j.procedure:apoc
Maven
≥ 5.0.0
< 5.5.0
5.5.0

References

Frequently Asked Questions

What is GHSA-9vx8-f5c4-862x?
GHSA-9vx8-f5c4-862x is a security vulnerability in Apoc involving XML External Entity (XXE) vulnerability in apoc.import.graphml under CWE-611: Improper Restriction of XML External Entity Reference.
Which Apoc versions are affected?
Affected versions include releases prior to 4.4.0.14, 5.5.0 across affected packages: org.neo4j.procedure:apoc.
What version fixes GHSA-9vx8-f5c4-862x?
Upgrading to 4.4.0.14, 5.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apoc affected?
Yes, org.neo4j.procedure:apoc is affected in releases prior to 4.4.0.14, 5.5.0. Upgrade your dependency to 4.4.0.14, 5.5.0 or later.
What is the CVSS score of GHSA-9vx8-f5c4-862x?
GHSA-9vx8-f5c4-862x has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H.
What CWE is associated with GHSA-9vx8-f5c4-862x?
GHSA-9vx8-f5c4-862x is classified under CWE-611: Improper Restriction of XML External Entity Reference (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.).
How can I check Maven dependencies for GHSA-9vx8-f5c4-862x?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.neo4j.procedure'. 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-9vx8-f5c4-862x",
  "modified" : "2023-03-31T14:27:12Z",
  "published" : "2023-02-24T17:39:18Z",
  "aliases" : [ ],
  "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 4.4.0.14. \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-procedures](https://github.com/neo4j-contrib/neo4j-apoc-procedures)\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"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.4.0.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.neo4j.procedure:apoc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/neo4j-contrib/neo4j-apoc-procedures/security/advisories/GHSA-9vx8-f5c4-862x"
  }, {
    "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-contrib/neo4j-apoc-procedures/commit/c3e2a29020497acf9417879f38e8af4e8c6d5783"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/neo4j-contrib/neo4j-apoc-procedures"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/tag/4.4.0.14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-24T17:39:18Z",
    "nvd_published_at" : null
  }
}