# CVE-2017-14623: Access Restriction Bypass in go-ldap

> An attacker can bypass authentication in applications using the go-ldap package if the server allows unauthenticated binds and the app ignores bind errors.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/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:** 20 Sep 2017
- **Updated:** 17 Sep 2024
- **Also known as:** AZL-40850, DEBIAN-CVE-2017-14623, GHSA-x27w-qxhg-343v, GO-2022-0887, UBUNTU-CVE-2017-14623

## What is CVE-2017-14623?

CVE-2017-14623 is a high-severity authentication bypass vulnerability in n/a, published on 20 Sep 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In the ldap.v2 (aka go-ldap) package through 2.5.0 for Go, an attacker may be able to login with an empty password. This issue affects an application using this package if these conditions are met: (1) it relies only on the return error of the Bind function call to determine whether a user is authorized (i.e., a nil return value is interpreted as successful authorization) and (2) it is used with an LDAP server allowing unauthenticated bind.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2017-14623?

3 open source packages ship an affected version, including github.com/go-ldap/ldap. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-ldap/ldap` | Go | All versions | 2.5.0 |
| `github.com/go-ldap/ldap` | Go | All versions | 2.5.0 |
| `github.com/go-ldap/ldap` | Go | All versions | 2.5.0+incompatible |

Products: Go-Ldap Project Ldap.

## How do I fix CVE-2017-14623?

Upgrade github.com/go-ldap/ldap to a fixed version for your release line: 2.5.0 or 2.5.0+incompatible.

## Is CVE-2017-14623 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-14623 and fix it if it is affected.

What it is: CVE-2017-14623 is a high-severity authentication bypass vulnerability in n/a, published on 20 Sep 2017. 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-2017-14623 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-ldap/ldap (Go): affected all versions; fixed in 2.5.0
- github.com/go-ldap/ldap (Go): affected all versions; fixed in 2.5.0
- github.com/go-ldap/ldap (Go): affected all versions; fixed in 2.5.0+incompatible

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

## Sources

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

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