# CVE-2018-18389: Incorrect access control in Neo4j Enterprise Database Server via LDAP authentication

> Attackers can bypass authentication and log into Neo4j Enterprise Database by exploiting incorrect access control in specific LDAP and System Account configurations.

- **Severity:** Critical 9.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Oct 2018
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-h5f5-rj4r-42f6

## What is CVE-2018-18389?

CVE-2018-18389 is a critical authentication bypass vulnerability in n/a, published on 16 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Due to incorrect access control in Neo4j Enterprise Database Server 3.4.x before 3.4.9, the setting of LDAP for authentication with STARTTLS, and System Account for authorization, allows an attacker to log into the server by sending any valid username with an arbitrary password.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2018-18389?

2 open source packages ship an affected version, including org.neo4j:neo4j-enterprise. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.neo4j:neo4j-enterprise` | Maven | From 3.4.0 | 3.4.9 |
| `org.neo4j:neo4j-enterprise` | Maven | From 3.4.0 | 3.4.9 |

Products: Neo4j Neo4j.

## How do I fix CVE-2018-18389?

Upgrade org.neo4j:neo4j-enterprise to 3.4.9 or later.

## Is CVE-2018-18389 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2021-34371](https://insights.sbomify.com/CVE-2021-34371/): Deserialization of Untrusted Data in Neo4j (critical 9.8)
- [CVE-2013-7259](https://insights.sbomify.com/CVE-2013-7259/): Neo4J vulnerable to Cross-Site Request Forgery (medium 6.8)
- [CVE-2024-34517](https://insights.sbomify.com/CVE-2024-34517/): Neo4j Cypher component mishandles IMMUTABLE privileges (medium 6.5)
- [CVE-2026-14587](https://insights.sbomify.com/CVE-2026-14587/): Unathenticated connection can hold Bolt channel open (medium 5.5)
- [CVE-2026-1471](https://insights.sbomify.com/CVE-2026-1471/): Caching of authentication context (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-18389 and fix it if it is affected.

What it is: CVE-2018-18389 is a critical authentication bypass vulnerability in n/a, published on 16 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-18389 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.neo4j:neo4j-enterprise (Maven): affected from 3.4.0; fixed in 3.4.9
- org.neo4j:neo4j-enterprise (Maven): affected from 3.4.0; fixed in 3.4.9

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-2018-18389/ (Markdown: https://insights.sbomify.com/CVE-2018-18389/index.md)
```

## Sources

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

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