# CVE-2017-2784: Memory corruption in mbed TLS

> A stack pointer invalid free in mbed TLS x509 parsing allows remote code execution via crafted certificates.

- **Severity:** High 8.1 (`CVSS:3.0/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 Apr 2017
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2017-2784, DEBIAN-CVE-2017-2784, GHSA-5wj7-rhf5-hqx4, MGASA-2017-0094, UBUNTU-CVE-2017-2784, openSUSE-SU-2017:0790-1, openSUSE-SU-2017:0792-1

## What is CVE-2017-2784?

CVE-2017-2784 is a high-severity memory corruption vulnerability in ARM mbed TLS, published on 20 Apr 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An exploitable free of a stack pointer vulnerability exists in the x509 certificate parsing code of ARM mbed TLS before 1.3.19, 2.x before 2.1.7, and 2.4.x before 2.4.2. A specially crafted x509 certificate, when parsed by mbed TLS library, can cause an invalid free of a stack pointer leading to a potential remote code execution. In order to exploit this vulnerability, an attacker can act as either a client or a server on a network to deliver malicious x509 certificates to vulnerable applications.

Weakness: CWE-295 (Improper Certificate Validation)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mbedtls` | SUSE:Package Hub 12 | All versions | 1.3.19-5.1 |
| `mbedtls` | SUSE:Package Hub 12 | All versions | 1.3.19-5.1 |

Products: Trustedfirmware Mbed Tls.

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

Upgrade to a fixed version.

## Is CVE-2017-2784 being exploited?

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

## Other vulnerabilities in ARM mbed TLS

- [CVE-2026-34875](https://insights.sbomify.com/CVE-2026-34875/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-49195](https://insights.sbomify.com/CVE-2024-49195/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-45158](https://insights.sbomify.com/CVE-2024-45158/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-45159](https://insights.sbomify.com/CVE-2024-45159/): Auth bypass in n/a (critical 9.8)
- [CVE-2023-45199](https://insights.sbomify.com/CVE-2023-45199/): Mbed TLS 3.2.x through 3.4.x before 3.5 has a Buffer Overflow that can lead to remote Code execution. (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2017-2784 is a high-severity memory corruption vulnerability in ARM mbed TLS, published on 20 Apr 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-2784 in the wild and no public exploit code.

Affected product: ARM mbed TLS. 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-2017-2784/ (Markdown: https://insights.sbomify.com/CVE-2017-2784/index.md)
```

## Sources

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

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