Skip to content

Neo4j Graph Database vulnerable to Path Traversal

Critical severity GitHub Reviewed Published Feb 1, 2022 in neo4j-contrib/neo4j-apoc-procedures • Updated Jan 27, 2023

Package

maven org.neo4j.procedure:apoc (Maven)

Affected versions

< 3.5.17
>= 4.2.0, < 4.2.10
>= 4.3.0.0, <= 4.3.0.3
= 4.4.0.0

Patched versions

3.5.17
4.2.10
4.3.0.4
4.4.0.1

Description

Impact

Directory Traversal Vulnerabilities found in several functions of apoc plugins in Neo4j Graph database. The attacker can retrieve and download files from outside the configured directory on the affected server. Under some circumstances, the attacker can also create files.

Patches

The users should aim to use the latest released version compatible with their Neo4j version. The minimum versions containing patch for this vulnerability (for Neo4j 4.2, 4.3, and 4.4 bundled with APOC, upgrade to the appropriate patched version):
3.5 - bundle n/a, standalone 3.5.0.17
4.2 - bundle 4.2.13, standalone 4.2.0.10
4.3 - bundle 4.3.9, standalone 4.3.0.4
4.4 - bundle 4.4.2, standalone 4.4.0.1

Workarounds

If you cannot upgrade the library, you can control the allowlist of the functions that can be used in your system:

For more information

If you have any questions or comments about this advisory:

Credits

We want to publicly recognize the contribution of Nicolai Grødum from the Red Team of PwC Norway for reporting this issue and following the responsible disclosure policy.

References

Reviewed Feb 1, 2022
Published to the GitHub Advisory Database Feb 1, 2022
Published by the National Vulnerability Database Mar 1, 2022
Last updated Jan 27, 2023

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

EPSS score

0.234%
(62nd percentile)

Weaknesses

CVE ID

CVE-2021-42767

GHSA ID

GHSA-4mpj-488r-vh6m

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.