GHSA-5v8v-gwmw-qw97

Suggest an improvement
Source
https://github.com/advisories/GHSA-5v8v-gwmw-qw97
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-5v8v-gwmw-qw97/GHSA-5v8v-gwmw-qw97.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-5v8v-gwmw-qw97
Aliases
Published
2023-01-13T21:28:46Z
Modified
2023-11-08T04:08:21.172909Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:L CVSS Calculator
Summary
org.neo4j.procedure:apoc Path Traversal Vulnerability
Details

Impact

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 procedure would need to have been allow listed in the neo4j configuration as well as having the apoc config apoc.export.file.enabled set to true.

On a UNIX based system the following query allows arbitrary write access to the tmp folder:

CALL apoc.export.csv.query('RETURN 1', 'file:///..//..//..//..//tmp/test.txt', {})

Patches

The users should aim to use the latest released version compatible with their Neo4j version. The minimum versions containing patch for this vulnerability are 4.4.0.12 and 4.3.0.12.

Workarounds

If you cannot upgrade the library, 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

For more information

If you have any questions or comments about this advisory: * Open an issue in neo4j-apoc-procedures * Email us at security@neo4j.com

Credits

We want to publicly recognise the contribution Adam Reziouk - Airbus.

Database specific
{
    "nvd_published_at": "2023-01-14T01:15:00Z",
    "github_reviewed_at": "2023-01-13T21:28:46Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-22"
    ]
}
References

Affected packages

Maven / org.neo4j.procedure:apoc

Package

Name
org.neo4j.procedure:apoc
View open source insights on deps.dev
Purl
pkg:maven/org.neo4j.procedure/apoc

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.3.0.12

Affected versions

1.*

1.0.0-RC1
1.0.0
1.1.0

3.*

3.0.4.1
3.0.4.2
3.0.8.4
3.0.8.5
3.1.0.2
3.1.0.3
3.1.0.4
3.1.0.5
3.1.2.5
3.1.3.7
3.1.3.8
3.1.3.9
3.2.0.1
3.2.0.4
3.2.3.5
3.2.3.6
3.3.0.1
3.3.0.2
3.3.0.3
3.3.0.4
3.4.0.1
3.4.0.2
3.4.0.3
3.4.0.4
3.4.0.5
3.4.0.7
3.5.0.1
3.5.0.2
3.5.0.4
3.5.0.5
3.5.0.6
3.5.0.7
3.5.0.10
3.5.0.11
3.5.0.12
3.5.0.13
3.5.0.14
3.5.0.15
3.5.0.17
3.5.0.18
3.5.0.19
3.5.0.20
3.5.0.21

4.*

4.0.0-rc01
4.0.0.0
4.0.0.1
4.0.0.2
4.0.0.5
4.0.0.6
4.0.0.7
4.0.0.8
4.0.0.9
4.0.0.10
4.0.0.11
4.0.0.12
4.0.0.13
4.0.0.14
4.0.0.15
4.0.0.16
4.0.0.17
4.0.0.18
4.1.0.0
4.1.0.1
4.1.0.2
4.1.0.3
4.1.0.4
4.1.0.5
4.1.0.6
4.1.0.7
4.1.0.8
4.1.0.9
4.1.0.10
4.1.0.11
4.1.0.12
4.2.0.0
4.2.0.1
4.2.0.2
4.2.0.3
4.2.0.4
4.2.0.5
4.2.0.6
4.2.0.7
4.2.0.8
4.2.0.9
4.2.0.10
4.2.0.11
4.2.0.12
4.3.0.0
4.3.0.1
4.3.0.2
4.3.0.3
4.3.0.4
4.3.0.5
4.3.0.6
4.3.0.7
4.3.0.8
4.3.0.9
4.3.0.10
4.3.0.11

Maven / org.neo4j.procedure:apoc

Package

Name
org.neo4j.procedure:apoc
View open source insights on deps.dev
Purl
pkg:maven/org.neo4j.procedure/apoc

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.4.0.0
Fixed
4.4.0.12

Affected versions

4.*

4.4.0.0
4.4.0.1
4.4.0.2
4.4.0.3
4.4.0.4
4.4.0.5
4.4.0.6
4.4.0.7
4.4.0.8
4.4.0.9
4.4.0.10
4.4.0.11