Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted binary payload to OCaml service
-
DeliveryService passes data to cstruct parsing routine
-
ExploitMishandled index escapes bounds validation
-
ExecutionOut-of-bounds read/write in Bigarray buffer
-
ImpactPartial memory disclosure or state corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Improper following of specification
|
| Exploitation Conditions | Exploitation requires that: (1) the target application uses a version of cstruct before 6.3.0; (2) the application exposes a code path that passes attacker-controlled binary data directly to cstruct index operations without prior length/bounds enforcement; and (3) the application is reachable over a network or accepts untrusted input. The library is not self-executing - the vulnerability is only reachable through the calling application's use of cstruct APIs. Applications that strictly validate input lengths before handing data to cstruct, or that operate entirely on trusted/internal data, are not meaningfully exposed. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L, score 7.3) reflects the exposure profile of a network protocol parsing library: if attacker-controlled binary data reaches a vulnerable cstruct code path, no authentication or user interaction is needed. However, exploitability is inherently indirect - cstruct is a library, not a standalone service, so real-world risk depends entirely on whether a deployed OCaml application exposes vulnerable parsing to untrusted input. AC:L is plausible for applications that parse raw network frames or binary protocol fields without input gating. EPSS data is not provided; KEV status is absent, and no POC has been identified, suggesting this is not currently under active exploitation. The partial CIA impact (C:L/I:L/A:L) is consistent with index errors that allow memory reads, possible minor state corruption, or process termination in error-intolerant deployments. The 'Information Disclosure' tag in the input understates the impact - CVSS explicitly scores I:L and A:L as well. |
| Exploit ScenarioDerived | An attacker sends a crafted binary payload - for example, a malformed network protocol frame or binary file - to an OCaml service that uses cstruct to parse it. The malformed index values trigger out-of-bounds memory access within the Bigarray buffer, leaking adjacent memory contents (e.g., session data or keys) or corrupting buffer state in a way that causes incorrect application behavior or process termination. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 10, 2026
Index mishandling in the OCaml cstruct library before 6.3.0 allows network-reachable attackers to trigger partial confidentiality, integrity, and availability impacts via crafted binary data passed to affected parsing routines. cstruct is a low-level binary buffer manipulation library used widely in OCaml network stacks and the MirageOS unikernel ecosystem; improper index handling can bypass the library's internal bounds logic, exposing adjacent memory or corrupting buffer state. No public exploit code has been identified at time of analysis, and active exploitation has not been confirmed by CISA KEV.
RemediationAI
Upgrade the cstruct opam package to version 6.3.0 or later, which resolves the index mishandling. The fix version is confirmed by the description ('before 6.3.0'). Operators using opam can run 'opam upgrade cstruct' and rebuild dependent packages. If an immediate upgrade is not feasible, the most actionable compensating control is to ensure that all data passed to cstruct parsing functions is bounded and sanitized at the application boundary before reaching the library - specifically, reject or truncate binary inputs exceeding expected protocol lengths. This trades some protocol flexibility for reduced exposure surface but does not eliminate the underlying flaw. The OSV advisory at https://osv.dev/vulnerability/OSEC-2026-20 should be consulted for any additional guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
cstruct (cpe:2.3:a:ocaml:cstruct:*:*:*:*:*:*:*:*) is an OCaml library that provides structured, bounds-aware access to Bigarray-backed binary buffers, commonly used to parse network protocols, filesystem headers, and other binary formats in OCaml applications and MirageOS unikernels. Unlike pure OCaml data structures, cstruct buffers interface with C-compatible memory regions, meaning that flawed index arithmetic or validation (CWE-573: Improper Following of Specification by Caller) can escape OCaml's normal runtime bounds-check guarantees. The root cause - index mishandling - suggests that computed offsets or lengths are not correctly validated against buffer boundaries before use, enabling out-of-bounds reads and potentially out-of-bounds writes into adjacent Bigarray memory.
Know when Cstruct gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Library is network-reachable via calling applications, requires no auth; partial CIA impact matches index mishandling with potential OOB read and write.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
The cstruct package before 6.3.0 for OCaml mishandles indexes.
Executive ViewAI
The OCaml cstruct library contains an index-handling vulnerability that allows remote attackers to leak sensitive data or corrupt memory in network applications through crafted binary payloads. Organizations deploying OCaml-based network services or MirageOS unikernels face potential data breaches and application instability. Exposure spans any OCaml infrastructure processing untrusted network input.
No vendor-released patch identified at time of analysis. Interim mitigations include restricting network access to cstruct-dependent applications to internal trusted sources only, implementing strict validation and bounds-checking on all binary input data, deploying monitoring and alerting for memory corruption errors or unexpected application crashes, and documenting workarounds or feature disablement options for services where business continuity permits.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-75709
GHSA-32j6-362j-46jc
NVD
CVE.org
EPSS
VulDB
Exploit-DB