# CVE-2023-23926: XML External Entity (XXE) vulnerability in apoc.import.graphml

> Attackers can exploit an XML External Entity vulnerability in the Neo4j APOC plugin to read local files and cause denial of service.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Feb 2023
- **Updated:** 10 Mar 2025
- **Also known as:** GHSA-6wxg-wh7f-rqpr

## What is CVE-2023-23926?

CVE-2023-23926 is a medium-severity vulnerability in neo4j apoc, published on 16 Feb 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

APOC (Awesome Procedures on Cypher) is an add-on library for Neo4j. An XML External Entity (XXE) vulnerability found in the apoc.import.graphml procedure of APOC core plugin prior to version 5.5.0 and 4.4.0.14 (4.4 branch) 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. The minimum version containing a patch for this vulnerability is 5.5.0. Those who cannot upgrade the library can control the allowlist of the procedures that can be used in your system.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2023-23926?

4 open source packages ship an affected version, including org.neo4j.procedure:apoc-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.neo4j.procedure:apoc-core` | Maven | All versions | 4.4.0.14 |
| `org.neo4j.procedure:apoc-core` | Maven | All versions | 4.4.0.14 |
| `org.neo4j.procedure:apoc-core` | Maven | From 5.0.0 | 5.5.0 |
| `org.neo4j.procedure:apoc-core` | Maven | From 5.0.0 | 5.5.0 |

Products: Neo4j Awesome Procedures on Cyper.

## How do I fix CVE-2023-23926?

Upgrade org.neo4j.procedure:apoc-core to a fixed version for your release line: 4.4.0.14 or 5.5.0.

## Is CVE-2023-23926 being exploited?

There is no known exploitation of CVE-2023-23926 in the wild and no public exploit code.

## Other vulnerabilities in neo4j apoc

- [CVE-2018-1000820](https://insights.sbomify.com/CVE-2018-1000820/): XML External Entity (XXE) vulnerability in neo4j.procedure:apoc (critical 10.0)
- [CVE-2022-23532](https://insights.sbomify.com/CVE-2022-23532/): neo4j-apoc-procedures is vulnerable to path traversal (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-23926 and fix it if it is affected.

What it is: CVE-2023-23926 is a medium-severity vulnerability in neo4j apoc, published on 16 Feb 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-23926 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.neo4j.procedure:apoc-core (Maven): affected all versions; fixed in 4.4.0.14
- org.neo4j.procedure:apoc-core (Maven): affected all versions; fixed in 4.4.0.14
- org.neo4j.procedure:apoc-core (Maven): affected from 5.0.0; fixed in 5.5.0
- org.neo4j.procedure:apoc-core (Maven): affected from 5.0.0; fixed in 5.5.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-23926/ (Markdown: https://insights.sbomify.com/CVE-2023-23926/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-23926
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-23926
- OSV: https://osv.dev/vulnerability/CVE-2023-23926

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-23926/
Summaries are generated and may contain mistakes; the official description above is the record.
