Skip to main content
Reconnecting to live updates…
EPSS 0.2%top 89%

Ocaml: Marshal integer overflow leads to out-of-heap read (CVE-2026-28364)

0
Medium
VulnerabilityCVE-2026-28364gcveosvosec-2026-18cve-2026-28364opam
Published: 09/10/2026 (09/10/2026, 10:00:00 UTC)
Source: GCVE Database
Product: ocaml

Description

An integer overflow vulnerability in OCaml's Marshal deserialization logic allows crafted serialized objects to bypass bounds checks, leading to out-of-heap reads. This can cause heap memory disclosure or denial of service via crashes. The flaw exists in the length validation of the deserializer, where an unsigned 64-bit addition can wrap, causing pointer calculations to underflow and bypass safety checks. The vulnerability affects multiple OCaml versions prior to 5.5.1 and was fixed in OCaml 5.5.1.

CVSS v3.1

Score 6.8medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Affected software

ocaml
pkg:opam/ocaml
Affected versions
<5.5.1<928e7c8a950db8730e8e84105d3be347cae38f5c<304654884d0c90b2e4ab673ff88caef38b05c714<428288660cc1f655605347e09e2fbc0b0a404660=3.07=3.07+1=3.07+2=3.08.0=3.08.1=3.08.2=3.08.3=3.08.4=3.09.0=3.09.1=3.09.2=3.09.3=3.10.0=3.10.1=3.10.2=3.11.0=3.11.1=3.11.2=3.12.0=3.12.1=4.00.0=4.00.1=4.01.0=4.02.0=4.02.1=4.02.2=4.02.3=4.02.4=4.03.0=4.03.1=4.04.0=4.04.1=4.04.2=4.04.3=4.05.0=4.05.1=4.06.0=4.06.1=4.06.2=4.07.0=4.07.1=4.07.2=4.08.0=4.08.1=4.08.2=4.09.0=4.09.1=4.09.2=4.10.0=4.10.1=4.10.2=4.10.3=4.11.0=4.11.1=4.11.2=4.11.3=4.12.0=4.12.1=4.12.2=4.13.0=4.13.1=4.13.2=4.14.0=4.14.1=4.14.2=4.14.3=4.14.4=4.14.5=5.0.0=5.0.1=5.1.0=5.1.1=5.1.2=5.2.0=5.2.1=5.2.2=5.3.0=5.3.1=5.4.0=5.4.1=5.4.2=5.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/10/2026, 13:26:52 UTC

Technical Analysis

CVE-2026-28364 is an integer overflow in OCaml's Marshal deserializer's length-validation logic. The vulnerability arises because the sum of offset, header length, and data length is computed using unsigned 64-bit addition that can wrap around, allowing an attacker-controlled data length field to bypass bounds checks. This causes the internal pointer 'intern_src_end' to wrap to a location before the input buffer, invalidating all subsequent read boundary checks. As a result, the deserializer can read heap memory beyond the input buffer, leading to out-of-bounds reads. The vulnerability affects the OCaml functions Marshal.from_bytes, Marshal.from_string, and the C API caml_input_value_from_block. Exploits include heap information disclosure and denial of service via crashes. The issue was reported on 2026-08-15, patched by 2026-09-05 in OCaml 5.5.1, and affects many versions prior to 5.5.1.

Potential Impact

Successful exploitation allows an attacker to cause out-of-bounds heap reads during deserialization, potentially leaking sensitive heap memory contents (information disclosure). It can also cause denial of service through crashes (SIGBUS/SIGSEGV). There is no indication of code execution or privilege escalation. The vulnerability impacts confidentiality and availability but not integrity.

Mitigation Recommendations

A patch is available and was released in OCaml version 5.5.1. Users should upgrade to OCaml 5.5.1 or later to remediate this vulnerability. The vendor advisory confirms the fix was merged into the 5.5, 4.14, and trunk branches. No additional mitigations are indicated or required beyond applying the official patch.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
OSEC-2026-18
Osv Schema Version
1.7.4
Aliases
["CVE-2026-28364"]
Ecosystems
["opam"]
Database Specific Severity
null
Cvss Version
3.1

Threat ID: 6aa2af59acd9273b4925a31a

Added to database: 09/10/2026, 13:23:37 UTC

Last enriched: 09/10/2026, 13:26:52 UTC

Last updated: 09/10/2026, 16:41:05 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses