# OSEC-2026-25: Heap buffer overflow in the OCaml `runtime_events` consumer when parsing an oversized custom user event

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-23T21:30:00.000Z
- Modified: 2026-11-19T10:30:06.447Z

## Description

ANT-2026-0JXJVEVY

Custom events maintains a cache of user events, it is possible to have a corrupt stream that has a valid message with one message type (which can be custom/unit/span/int) and then has the same event with a different message type.

This would never be encountered in a real program but can lead to a crash.

## Fix

Check message lengths for all runtime event types, report a corrupt stream on mismatch.

## Am I affected?

If the runtime events producer and consumer run in separate processes, and the producer can be tricked into producing malformed data.

## Timeline

- 2026-08-24: vulnerability was found
- 2026-08-27: forwarded report to security@ocaml.org
- 2027-09-05: fix merged to trunk

(As written by OCaml Security Advisories.)

## Affected

- ocaml (opam): from 5.0.0 before 5.5.2
- https://github.com/ocaml/ocaml: before 2247294d06464df0273479f41b0418655918da27; before 9dcf0c86201cf5e8ece56c6bb5f61fc4d92fb74a

## Sources

- OCaml Security Advisories: [OSEC-2026-25](https://osv.dev/vulnerability/OSEC-2026-25), CC0-1.0, modified 2026-11-19

---

Page: https://cve.day/OSEC-2026-25 · Whole record: https://cve.day/OSEC-2026-25.json · Rebuilt by cve.day 2026-11-25T22:56:18.366Z
