CVE-2018-9838 json
An integer overflow in the `bigarray` serialization module leads to arbitrary code execution
published 2018-04-06 8 y ago modified 2026-11-06 2 d ago also EUVD-2018-21432 , OSEC-2018-01
- cvss
- 9.8
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.2%
- EPSS 4.2% chance of exploitation in 30 days, percentile 90%
- public exploits
- 0
- none known
Summary
The caml_ba_deserialize function in byterun/bigarray.c in the standard library in OCaml 4.06.0 has an integer overflow which, in situations where marshalled data is accepted from an untrusted source, allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted object.
Patch / fix
- opam ocaml 4.07.0
- ocaml Debian 14, Debian 13, Debian 12 4.05.0-11
debian advisories DEBIAN-CVE-2018-9838
- ocaml Ubuntu Pro 14.04 LTS 4.01.0-3ubuntu3.1+esm1
- ocaml Ubuntu Pro 16.04 LTS 4.02.3-5ubuntu2+esm1
- ocaml Ubuntu Pro 18.04 LTS 4.05.0-10ubuntu1+esm1
ubuntu advisories UBUNTU-CVE-2018-9838
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ocaml SLE Software Development Kit 12 SP3 4.03.0-8.6.8
- ocaml SLE Software Development Kit 11 SP4 4.02.1-4.6.1
- ocaml SLE Software Development Kit 11 SP4 4.02.1-4.3.2
- ocaml SLE Software Development Kit 12 SP3 4.03.0-8.3.1
suse advisories SUSE-SU-2018:1493-1SUSE-SU-2018:1494-1SUSE-SU-2018:1075-1SUSE-SU-2018:0983-1
- github.com/ocaml/ocaml#1718 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-9838 updated cvss 5.6
ocaml: Integer overflow in byterun/bigarray.c:caml_ba_deserialize() allows remote attackers to cause a denial of service or other unspecified impact
-
Red Hat Enterprise Linux 6 ocaml, ocaml-x11, ocaml-emacs, ocaml-camlp4, ocaml-labltk, ocaml-source, +2 moreaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux 7 ocaml, ocaml-x11, ocaml-emacs, ocaml-camlp4, ocaml-labltk, ocaml-source, +3 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux 8 ocaml, ocaml-camlp4, ocaml-labltk, ocaml-runtime, ocaml-ocamldoc, ocaml-compiler-libsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.17% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| opam | ocaml | <4.07.0 |
4.07.0 |
Classification
- Weakness
-
- CWE-190 Integer Overflow or Wraparound
References
-
github.com
/ocaml/ocaml/pull/1718
patch
-
security.gentoo.org
/glsa/202007-48
vendor-advisory
-
caml.inria.fr
/mantis/view.php?id=7765
issue-tracking, vendor-advisory
-
github.com
/ocaml/ocaml/issues/7765
report
Sources
- CVE List CVE-2018-9838
- NVD CVE-2018-9838
- OSV OSEC-2018-01
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.