OCaml Flaw Enables Remote Code Execution
HighExecutive Summary
A high-severity buffer over-read vulnerability, CVE-2026-28364, exists in OCaml's Marshal deserialization process.
This flaw stems from missing bounds validation and allows remote attackers to execute arbitrary code through a multi-phase attack.
Patches are available in versions 4.14.3 and 5.4.1 and should be applied immediately.
Vulnerability Details
- Affected Product: OCaml (versions before 4.14.3 and 5.x before 5.4.1)
- Identifier: CVE-2026-28364
- CVSS Score: 7.9 (High)
- Exploitation Status: No known active exploitation.
Risk & Impact
- Triage: Critical. Immediate patching is recommended due to the potential for remote code execution.
- Attack Vector: A remote attacker can send crafted Marshal data to a vulnerable application. The lack of bounds checking in the `readblock()` function allows an unbounded `memcpy()` operation, leading to a buffer over-read that can be chained to achieve code execution.
- Ease of Exploit: The attack complexity is considered low, and it requires no user interaction or special privileges.
Action Plan
- Immediate Action: Upgrade OCaml to version 4.14.3 or 5.4.1 or a later version.
- Workaround: No specific workarounds have been provided. Prioritize applying the available patches.
- Detection: Monitor applications that utilize OCaml's Marshal module for abnormal behavior, unexpected process terminations, or crashes that could indicate exploitation attempts.
Relevant professional terms
- Deserialization
- The process of converting data from a stored or transmittable format (like a byte stream) back into an object. If an application deserializes untrusted data without proper validation, it can lead to severe vulnerabilities like remote code execution.
- Buffer Over-read
- A vulnerability where a program reads data beyond the boundary of a buffer. This can lead to the disclosure of sensitive information, system crashes, or be leveraged by an attacker to bypass security mechanisms.
