Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

OSEC-2026-20

HighCVSS 7.3 / 10
Published Sep 10, 2026·Last modified Sep 10, 2026
Affected Components(51)
mirage/ocaml-cstruct
5.0.0
mirage/ocaml-cstruct
1.3.1
mirage/ocaml-cstruct
2.3.3
1 / 17
Description

Several functions in cstruct may use wrong data, leading to unexpected exceptions and return corrupted data.

Impact

  • Cstruct.filter_map writes retained bytes at their original input positions, producing corrupted output when earlier bytes are dropped.
  • Cstruct.tail ~rev:true removes two bytes instead of one and raises an exception for single-byte views.
  • Cstruct.cuts ~rev:true may compare input against the wrong data, split at incorrect positions, and construct results using offsets outside the requested view.
  • Cstruct.find and Cstruct.find_sub ~rev:true may return slices from the wrong location when operating on non-zero-offset views.

These are a set of logical indexing and bounds-calculation errors (CWE-682), and not direct memory-safety vulnerabilities. However, affected operations may return corrupted data, raise an unexpected exception, split input incorrectly, or return bytes outside the requested Cstruct view but still within its backing buffer.

In security-sensitive parsers, this could cause validation bypasses, denial of service, or unintended disclosure of adjacent buffer contents.

Workarounds

Users unable to upgrade cstruct should backport the corresponding source changes. There is no configuration-based mitigation since these are buggy library calls.

References

Discovered via Scrutineer and Deepseek GLM-5.3 Flash running locally.

Timeline

  • 2026-09-04: reported via GitHub to ocaml/security-advisories repository
  • 2026-09-05: reported via email to security@ocaml.org
  • 2026-09-05: patch proposed and reviewed
  • 2026-09-05: release cstruct 6.3.0
  • 2026-09-10: published advisory
Upload your SBOM

Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.

Risk Scores
Base Score
7.3

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information. There is a low impact on the integrity of the data. There is a low impact on the availability of the system.

Threat Intelligence
6.7

Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.

EPSS
N/A

Probability that this vulnerability will be exploited in the wild within the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Related Vulnerabilities
  • EUVD-2026-75709
    Alias
  • CVE-2026-89087
    Alias

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard