CVE-2026-41082
JSON

7.3high

opam install sandbox escape

Severity
7.3high CVSS:3.1 by mitre
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
OSEC-2026-03

Description

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

Affected

Product or packageVersionsReported by
OCaml opambefore 2.5.1CVE List, NVD
ocaml-duneNot specifiedCVE List
opam-devel (opam)before 2.5.1OCaml Security Advisories
https://github.com/ocaml/opambefore d7283e3b5845447ee618794d87cfe224dd980c8f, before c8fcf65779fe7048f9b5ef59886bfa9c5d102d84OCaml Security Advisories
debian debian_linux11.0NVD
redhat enterprise_linux10.0NVD

All scores

mitre7.3high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
redhat-SADP7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
OCaml Security Advisories5.7medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-22CWE-24

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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

OCaml Security Advisories

Summary

.install files do not validate whether they are inside the package area, and so can bypass sandboxing.

Exploit

In a package.install file, this installs a file as ``~/.bashrc`:

bin: [
  "payload.sh" {"../../../.bashrc"}
]

Timeline

  • 2026-04-11: Anil forwarded the issue from Andrew Nesbitt to the OCaml security team
  • 2026-04-11: Kate developed a fix
  • 2026-04-15: opam 2.5.1 was released with the fix
NVD (es)

En OCaml opam antes de 2.5.1, un campo .install que contiene una ruta de archivo de destino puede usar .. / para alcanzar un directorio padre.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41082 changed 2026-07-15CVE Terms of Use
OCaml Security AdvisoriesOSEC-2026-03 changed 2026-11-06CC0-1.0
NVDCVE-2026-41082 changed 2026-10-26Public domain