# CVE-2026-28364: Memory corruption in OCaml

> A buffer over-read in OCaml's Marshal deserialization allows remote code execution via crafted data, requiring an upgrade to patched versions.

- **Severity:** High 7.9 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Feb 2026
- **Updated:** 15 Jul 2026
- **Also known as:** AZL-78495, AZL-79502, DEBIAN-CVE-2026-28364, GHSA-g54x-7hpm-29q8, GHSA-j26j-m5xr-g23c, GHSA-m34r-cgq7-jhfm, OESA-2026-1522, OESA-2026-1523, OESA-2026-1524, OESA-2026-1525, OESA-2026-1526, OSEC-2026-01, OSEC-2026-18, OSEC-2026-23, SUSE-SU-2026:0800-1, SUSE-SU-2026:0830-1, UBUNTU-CVE-2026-28364, openSUSE-SU-2026:20368-1

## What is CVE-2026-28364?

CVE-2026-28364 is a high-severity memory corruption vulnerability in OCaml, published on 27 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In OCaml before 4.14.3 and 5.x before 5.4.1, a buffer over-read in Marshal deserialization (runtime/intern.c) enables remote code execution through a multi-phase attack chain. The vulnerability stems from missing bounds validation in the readblock() function, which performs unbounded memcpy() operations using attacker-controlled lengths from crafted Marshal data.

Weakness: CWE-125 (Out-of-bounds Read), CWE-126 (Buffer Over-read)

## Which versions are affected by CVE-2026-28364?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ocaml` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 4.14.2-150600.3.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 4.14.2-150600.3.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 4.05.0-150200.15.3.1 |
| `ocaml` | SUSE:Linux Enterprise Server for SAP Applications 15 SP6 | All versions | 4.14.2-150600.3.3.1 |
| `ocaml` | openSUSE:Leap 15.6 | All versions | 4.14.2-150600.3.3.1 |
| `ocaml` | openSUSE:Leap 16.0 | All versions | 4.14.2-160000.4.1 |

Products: Ocaml Ocaml.

## How do I fix CVE-2026-28364?

Upgrade to a fixed version.

## Is CVE-2026-28364 being exploited?

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

Public exploit code:

- I found an integer overflow that defeats OCaml's fix for CVE-2026-28364: heap memory disclosure and SIGBUS crashes via Marshal deserialization. PoCs, advisory, and proposed patch — fixed in OCaml 5.5.1 (OSEC-2026-18). (github_poc): https://github.com/Akshay-M-Singh/ocaml-marshal-vulnerability

## Other vulnerabilities in OCaml

- [CVE-2018-9838](https://insights.sbomify.com/CVE-2018-9838/): Integer overflow in n/a (critical 9.8)
- [CVE-2017-9772](https://insights.sbomify.com/CVE-2017-9772/): Privilege escalation in n/a (critical 9.8)
- [CVE-2017-9779](https://insights.sbomify.com/CVE-2017-9779/): Other in n/a (high 7.8)
- [CVE-2026-34353](https://insights.sbomify.com/CVE-2026-34353/): Integer overflow in OCaml (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-28364 and fix it if it is affected.

What it is: CVE-2026-28364 is a high-severity memory corruption vulnerability in OCaml, published on 27 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-28364 in the wild and no public exploit code.

Affected product: OCaml. 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-2026-28364/ (Markdown: https://insights.sbomify.com/CVE-2026-28364/index.md)
```

## Sources

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

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