CVE-2026-41082 Path traversal in opam

High 7.3 Published Updated

An attacker can write files to arbitrary locations outside the intended directory via path traversal in opam install fields.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-41082?

CVE-2026-41082 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 16 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.

Weakness: CWE-22, CWE-24

Which versions are affected by CVE-2026-41082?

It affects 3 products.

Linux distribution packages (1)
opam openSUSE:TumbleweedAll versions2.5.1-1.1

Products include Debian Debian Linux, Ocaml Opam, Redhat Enterprise Linux.

How do I fix CVE-2026-41082?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-41082 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41082 exists.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-41082, GHSA-97q5-qf47-hvrw, MGASA-2026-0116, OSEC-2026-03, UBUNTU-CVE-2026-41082, USN-8256-1 and 1 more.

Is CVE-2026-41082 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free