USN-8256-1: opam vulnerability

Publication date

7 May 2026

Overview

opam could be made to install files in unintended locations if it installed a specially crafted package.


Packages

  • opam - package manager for OCaml

Details

Andrew Nesbitt discovered that opam did not properly validate file
destination paths in package install files. An attacker could use this
issue to bypass sandbox protections and write files to arbitrary locations,
possibly leading to arbitrary code execution.

Andrew Nesbitt discovered that opam did not properly validate file
destination paths in package install files. An attacker could use this
issue to bypass sandbox protections and write files to arbitrary locations,
possibly leading to arbitrary code execution.

Update instructions

In general, a standard system update will make all the necessary changes.

Learn more about how to get the fixes.

The problem can be corrected by updating your system to the following package versions:

Ubuntu Release Package Version
26.04 LTS resolute opam –  2.5.0-1ubuntu0.1~esm1  
opam-installer –  2.5.0-1ubuntu0.1~esm1  
25.10 questing opam –  2.3.0-1+deb13u1build0.25.10.1
opam-installer –  2.3.0-1+deb13u1build0.25.10.1
24.04 LTS noble opam –  2.1.5-1ubuntu0.1~esm2  
opam-installer –  2.1.5-1ubuntu0.1~esm2  
22.04 LTS jammy opam –  2.1.2-1+deb12u1build0.22.04.1
opam-installer –  2.1.2-1+deb12u1build0.22.04.1
20.04 LTS focal opam –  2.0.5-1ubuntu1+esm1  
opam-installer –  2.0.5-1ubuntu1+esm1  

Reduce your security exposure

Ubuntu Pro provides ten-year security coverage to 25,000+ packages in Main and Universe repositories, and it is free for up to five machines.


Have additional questions?

Talk to a member of the team ›