Skip to main content
VulnerabilityPublished Updated

Ocaml: Integer overflow

Affects ocamlSource GCVE Database

0

Public exploit available · CVSS 7.0 High : upgrade to 5.5.2 or 4.14.5 as a priority.

Data as of 6 Nov 2026, 15:38 UTC

CVSS 4.0 base score
7.0High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 5.5.2, 4.14.5
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:P

What to do

Upgrade ocaml to 5.5.2 or 4.14.5.

Affected software

ProductAffectedFixed in
opamocamlpkg:opam/ocamlOther threatsAffected
  • 5.0.0 – 5.5.1
  • <4.14.5
  • >=5 <5.5.2
15 affected builds
Fixed in
  • 4.14.5
  • 5.5.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available and has been merged into OCaml trunk and released in versions 4.14.5 and 5.5.2. Users should upgrade to these fixed versions or later. The fix ensures integer overflow is detected and handled by raising exceptions, preventing unsafe memory mapping. If upgrading is not immediately possible, review usage of Unix.map_file to ensure dimensions and file size inputs cannot be influenced by untrusted sources.

Description

An integer overflow vulnerability exists in the Unix.map_file function of the OCaml standard library when calculating the product of bigarray dimensions. This overflow can lead to incorrect memory mapping behavior if the dimensions or file size are user-controllable. The issue is fixed by using a safer multiplication function that detects overflow and raises an exception. Versions prior to 4.14.5 and versions from 5 up to but not including 5.5.2, as well as several 3.x versions, are affected.

Community reviews

Loading reviews…