CVE-2022-23532 neo4j-apoc-procedures is vulnerable to path traversal
Attackers with query execution access can create files outside intended directories via path traversal in Neo4j APOC export procedures.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-23532?
CVE-2022-23532 is a high-severity path traversal vulnerability in neo4j-contrib neo4j-apoc-procedures, published on 14 Jan 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 that provides hundreds of procedures and functions. A path traversal vulnerability found in the apoc.export.* procedures of apoc plugins in Neo4j Graph database. The issue allows a malicious actor to potentially break out of the expected directory. The vulnerability is such that files could only be created but not overwritten. For the vulnerability to be exploited, an attacker would need access to execute an arbitrary query, either by having access to an authenticated Neo4j client, or a Cypher injection vulnerability in an application. The minimum versions containing patch for this vulnerability are 4.4.0.12 and 4.3.0.12 and 5.3.1. As a workaround, you can control the allowlist of the procedures that can be used in your system, and/or turn off local file access by setting apoc.export.file.enabled=false.
Weakness: CWE-22
Which versions are affected by CVE-2022-23532?
4 open source packages ship an affected version, including org.neo4j.procedure:apoc. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.neo4j.procedure:apoc Maven | All versions | 4.3.0.12 |
org.neo4j.procedure:apoc Maven | All versions | 4.3.0.12 |
org.neo4j.procedure:apoc Maven | From 4.4.0.0 | 4.4.0.12 |
org.neo4j.procedure:apoc Maven | From 4.4.0.0 | 4.4.0.12 |
Products include Neo4j Awesome Procedures on Cyper.
How do I fix CVE-2022-23532?
Upgrade org.neo4j.procedure:apoc to a fixed version for your release line: 4.3.0.12 or 4.4.0.12.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-23532 being exploited?
There is no known exploitation of CVE-2022-23532 in the wild and no public exploit code.
Other vulnerabilities in neo4j-contrib neo4j-apoc-procedures
Sources
Also known as GHSA-5v8v-gwmw-qw97.