Skip to main content

OCaml cstruct EUVDEUVD-2026-75709

| CVE-2026-89087 HIGH
Improper Following of Specification by Caller (CWE-573)
2026-09-10 mitre GHSA-32j6-362j-46jc
7.3
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted binary payload to OCaml service
  2. Delivery
    Service passes data to cstruct parsing routine
  3. Exploit
    Mishandled index escapes bounds validation
  4. Execution
    Out-of-bounds read/write in Bigarray buffer
  5. Impact
    Partial 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

cstruct 0 <6.3.0

Affected Packages

euvd cstruct fix: 6.3.0

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

Vendor (mitre) PRIMARY 7.3 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
vuln.today AI 7.3 HIGH

Library is network-reachable via calling applications, requires no auth; partial CIA impact matches index mishandling with potential OOB read and write.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

Lifecycle Timeline

2
Patch available
Sep 10, 2026 - 21:02 EUVD
CVE Published
Sep 10, 2026 - 19:55 cve.org
HIGH 7.3

DescriptionCVE.org

The cstruct package before 6.3.0 for OCaml mishandles indexes.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Low
niche OCaml/MirageOS ecosystem library, limited enterprise footprint
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy