CVE-2026-89087
The cstruct package before 6.3.0 for OCaml mishandles indexes.
The cstruct package before 6.3.0 for OCaml mishandles indexes.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
CVE-2026-89087- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-573
- Updated
- 2026-11-02
EUVDEUVD-2026-75709
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
EUVD-2026-75709- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-32j6-362j-46jc
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
GHSA-32j6-362j-46jc- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-573
- Updated
- 2026-11-02
NVD
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
CVE-2026-89087- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-573
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-89087
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
DEBIAN-CVE-2026-89087- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
OSVOSEC-2026-20
7.3
Cstruct indexing bugs can corrupt filtered output and reverse parsing results
Several functions in cstruct may use wrong data, leading to unexpected exceptions and return corrupted data.
Impact
Cstruct.filter_mapwrites retained bytes at their original input positions, producing corrupted output when earlier bytes are dropped.Cstruct.tail ~rev:trueremoves two bytes instead of one and raises an exception for single-byte views.Cstruct.cuts ~rev:truemay compare input against the wrong data, split at incorrect positions, and construct results using offsets outside the requested view.Cstruct.findandCstruct.find_sub ~rev:truemay 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 [email protected]
- 2026-09-05: patch proposed and reviewed
- 2026-09-05: release cstruct 6.3.0
- 2026-09-10: published advisory
- Record
OSEC-2026-20- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Updated
- 2026-11-06
OSVUBUNTU-CVE-2026-89087
7.3
The cstruct package before 6.3.0 for OCaml mishandles indexes.
- Record
UBUNTU-CVE-2026-89087- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ocaml-cstructDebian:12 |
All versions, plus listed versions 6.1.1-16.2.0-16.2.0-26.2.0-36.2.0-46.3.0-1 |
None known |
ocaml-cstructDebian:13 |
All versions, plus listed versions 6.2.0-36.2.0-46.3.0-1 |
None known |
ocaml-cstructDebian:14 |
before 6.3.0-1, plus listed versions 6.2.0-36.2.0-4 |
6.3.0-1 |
cstructopam |
before 6.3.0, plus listed versions 0.4.00.4.10.5.00.5.10.5.2 Show 45 moreShow less0.5.30.6.00.6.10.6.20.7.00.7.10.8.00.8.11.0.01.0.11.1.01.2.01.3.01.3.11.4.01.5.01.6.01.7.01.7.11.8.01.9.02.0.02.1.02.2.02.3.02.3.12.3.22.4.13.0.03.0.13.0.23.1.03.1.13.2.03.2.13.3.03.4.03.5.03.6.03.7.04.0.05.0.05.1.15.2.06.0.0 |
6.3.0 |
ocaml-cstructUbuntu:22.04:LTS |
All versions, plus listed versions 6.0.0-1build16.0.1-1build16.0.1-1build3 |
None known |
ocaml-cstructUbuntu:24.04:LTS |
All versions, plus listed versions 6.2.0-2build16.2.0-2build26.2.0-2build3 |
None known |
ocaml-cstructUbuntu:26.10 |
All versions, plus listed versions 6.2.0-3build136.2.0-4build1 |
None known |
ocaml-cstructUbuntu:26.04:LTS |
All versions, plus listed versions 6.2.0-3build96.2.0-3build106.2.0-3build116.2.0-3build13 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-89087 is a high vulnerability (CVSS 7.3) in Ocaml Cstruct, published September 10, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 24th percentile. Fixed in ocaml-cstruct 6.3.0-1.
References
Left out here: 4 versions. The JSON record has them.