# CVE-2024-53846: ssl fails to validate incorrect extened key usage

> Attackers can bypass SSL certificate validation by presenting incorrect extended key usage, allowing unauthorized connections in Erlang OTP applications.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Dec 2024
- **Updated:** 6 Dec 2024
- **Also known as:** AZL-54051, DEBIAN-CVE-2024-53846, GHSA-qw6r-qh9v-638v, UBUNTU-CVE-2024-53846, USN-7961-1

## What is CVE-2024-53846?

CVE-2024-53846 is a medium-severity vulnerability in erlang otp, published on 5 Dec 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

OTP is a set of Erlang libraries, which consists of the Erlang runtime system, a number of ready-to-use components mainly written in Erlang, and a set of design principles for Erlang programs. A regression was introduced into the ssl application of OTP starting at OTP-25.3.2.8, OTP-26.2, and OTP-27.0, resulting in a server or client verifying the peer when incorrect extended key usage is presented (i.e., a server will verify a client if they have server auth ext key usage and vice versa).

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2024-53846?


## How do I fix CVE-2024-53846?

Upgrade to a fixed version.

## Is CVE-2024-53846 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53846 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-53846 and fix it if it is affected.

What it is: CVE-2024-53846 is a medium-severity vulnerability in erlang otp, published on 5 Dec 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53846 exists.

Affected product: erlang otp. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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