CVE-2021-34802: Neo4j kernel Improper Privilege Management Vulnerability

HIGH
Advisory Identifier: GHSA-2w4h-f44w-968f
CVSS 8.8
CWE-269
Published
Advisory Summary

CVE-2021-34802 is a HIGH (CVSS 8.8) improper privilege management vulnerability (CWE-269: Improper Privilege Management) affecting Neo4j kernel libraries in the Maven ecosystem. The issue involves improper privilege management in neo4j graph database. Remediation is available by upgrading affected packages to version 4.2.8.

CVE-2021-34802 at a Glance

CVE Identifier CVE-2021-34802
GHSA Identifier GHSA-2w4h-f44w-968f
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Neo4j kernel
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2021-34802

To remediate this vulnerability, upgrade all affected Neo4j kernel 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:neo4j-kernel fixed: 4.2.8
<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-kernel</artifactId>
    <version>4.2.8</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

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-34802, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.neo4j

Analyze the terminal output to locate any version of Neo4j kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.neo4j 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Neo4j kernel, 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

A failure in resetting the security context in some transaction actions in Neo4j Graph Database 4.2 could allow authenticated users to execute commands with elevated privileges.

CVE-2021-34802 Affected Neo4j kernel Versions

1 component(s)
Fixed Versions:
4.2.8
Product / Package Ecosystem Affected Versions Fixed Version
org.neo4j:neo4j-kernel
Maven
≥ 4.2.0
< 4.2.8
4.2.8

References

Frequently Asked Questions

What is CVE-2021-34802?
CVE-2021-34802 is a security vulnerability in Neo4j kernel involving Improper Privilege Management in Neo4j Graph Database under CWE-269: Improper Privilege Management.
Which Neo4j kernel versions are affected?
Affected versions include releases prior to 4.2.8 across affected packages: org.neo4j:neo4j-kernel.
What version fixes CVE-2021-34802?
Upgrading to 4.2.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is neo4j-kernel affected?
Yes, org.neo4j:neo4j-kernel is affected in releases prior to 4.2.8. Upgrade your dependency to 4.2.8 or later.
What is the CVSS score of CVE-2021-34802?
CVE-2021-34802 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-34802?
CVE-2021-34802 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Maven dependencies for CVE-2021-34802?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.neo4j'. 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-2w4h-f44w-968f",
  "modified" : "2022-06-21T20:12:33Z",
  "published" : "2022-05-24T19:09:23Z",
  "aliases" : [ "CVE-2021-34802" ],
  "summary" : "Improper Privilege Management in Neo4j Graph Database",
  "details" : "A failure in resetting the security context in some transaction actions in Neo4j Graph Database 4.2 could allow authenticated users to execute commands with elevated privileges.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.neo4j:neo4j-kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.2.7"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-34802"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/neo4j/neo4j"
  }, {
    "type" : "WEB",
    "url" : "https://neo4j.com"
  }, {
    "type" : "WEB",
    "url" : "https://neo4j.com/developer/kb/neo4j-4-2-x-sec-vuln-fix"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-21T20:12:33Z",
    "nvd_published_at" : "2021-07-30T14:15:00Z"
  }
}