Latest stable OCaml: 5.5.2, released (release notes). 11 stable releases since 14 Mar 2024.
OCaml.
26 advisories · 10 in the compilerPublished on the OCaml security tracker in 2026, as of 24 October 2026.
- 11stable releases since Mar 2024
- 77days between stable releases, median
- 2in Jun 2026, the busiest month
- 274days, the longest wait (8 Jan 2025 to 9 Oct 2025)
OCaml 5.5.2 came out on 23 October 2026 with fixes for six security advisories, OSEC-2026-21 to 26, and every one of them credits Anthropic as the reporter. They cover Str partial matching, an integer overflow in Unix.map_file, several problems in Marshal, command quoting on Windows and two flaws in the runtime_events consumer. The release also fixes two rare miscompilations, one with atomic loads and one with immediate range patterns.
That brings the OCaml security tracker to 26 advisories this year, 10 of them against the compiler and runtime and the rest against packages such as tls, mirage-crypto, opam and cohttp. Marshal has come up three times: in 4.14.3 and 5.4.1 in February, in 5.5.1 in September and again now. 5.5.1 also fixed a type system bug for module-dependent functions.
As of 24 October 2026. OCaml security advisories.
Latest releases
5.5.2Six security fixes (OSEC-2026-21 to 26) and two miscompilation fixes.5.5.1Type system fix for module-dependent functions; Marshal and bytecode loading overflows.5.5.0Feature release opening the 5.5 line.4.14.4Bigarray reshape overflow (CVE-2026-34353) and Windows filename quoting.5.4.1Marshal over-read fix for the 5.4 line.4.14.3Marshal over-read fix for the 4.14 line.

Installing OCaml with opam
Install opam, OCaml's package manager, and let it build the compiler: opam init creates a default switch, an isolated environment holding one compiler and its packages. opam has supported Windows natively since 2.2.0; the current opam release is 2.6.1, from 7 October 2026.
- On Linux, macOS or *BSD, make sure gcc, build-essential, curl, unzip and bubblewrap are installed, then run the install script and initialise opam:
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)" opam init eval $(opam env) - On Windows, install Git and opam with winget, then run
opam initin a new terminal:winget install Git.Git OCaml.opam - Add the OCaml Platform tools to the switch: Dune for builds, the language server for editors, odoc, ocamlformat and the utop REPL:
opam install dune ocaml-lsp-server odoc ocamlformat utop
If you said no to the shell hook during opam init, run eval $(opam env) in each new shell, or prefix commands with opam exec --. Distribution packages of opam can lag behind and may not know the newest compiler.
Which OCaml version to run, and moving to a new one
New projects should use the newest 5.x release. The 4.14 line still gets patch releases for code that can't move to OCaml 5's multicore runtime yet; the chart shows every compiler release since 2024 by series.
- Refresh the package list and create a switch for the new compiler. A switch named after a directory is picked automatically when you run opam inside it:
opam update opam switch create 5.5.2 eval $(opam env) - Reinstall your project's dependencies in the new switch, for example with
opam install . --deps-onlyfrom a directory with an opam file, then rebuild and run your tests. - Remove the old switch once nothing needs it:
opam switch remove <name>.
Creating a switch compiles OCaml from source, which takes a few minutes; the ocaml-system package reuses a compiler installed by your OS instead.
opam usage OCaml releases opam switch manual opam install manual

Pinning a package with opam
opam pin add <package> <target> holds a package at a version, or points it at a local path or a git branch or commit, and opam upgrade then leaves it alone or rebuilds it from that source.
- Pin to a version, a checkout, a git ref or the package's upstream repository:
opam pin add camlpdf 1.7 opam pin add camlpdf ~/src/camlpdf opam pin add opam-lib https://github.com/ocaml/opam.git#1.2 opam pin add opam-lib --dev-repo - To patch a dependency, fetch its source pinned, edit it, and rebuild from the checkout:
opam source <package> --dev-repo --pin cd <package> opam upgrade . - List pins with
opam pin listand drop one withopam pin remove <package>.

Questions people search for
What is the latest version of OCaml?
OCaml 5.5.2, released 23 October 2026 (release notes). Create a switch for it with opam switch create 5.5.2.
Is OCaml 4.14 still maintained?
Yes, it still gets patch releases: the newest is 4.14.4, from 15 June 2026. The 4.14 line exists for code that can't move to OCaml 5's runtime yet; new projects should start on 5.x.
How do I install OCaml on Windows?
Use opam, which runs natively on Windows since 2.2.0: winget install Git.Git OCaml.opam, then opam init in a new terminal. WSL 2 with the Linux instructions also works.

From @ocaml_org on X
[Changelog] Release of OCaml 5.5.2: We have the pleasure of celebrating the anniversary of the first powered flight in Europe by announcing the release of OCaml 5.5.2.
OCaml 5.5.2 fixes various minor security issues, two rare miscompilations, a… dlvr.it/TW2grr
The 5.5.2 announcement, posted the day after the release.
