CVE-2026-41082
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 package | Versions | Reported by |
|---|---|---|
| OCaml opam | before 2.5.1 | CVE List, NVD |
| ocaml-dune | Not specified | CVE List |
| opam-devel (opam) | before 2.5.1 | OCaml Security Advisories |
| https://github.com/ocaml/opam | before d7283e3b5845447ee618794d87cfe224dd980c8f, before c8fcf65779fe7048f9b5ef59886bfa9c5d102d84 | OCaml Security Advisories |
| debian debian_linux | 11.0 | NVD |
| redhat enterprise_linux | 10.0 | NVD |
All scores
| mitre | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L |
| redhat-SADP | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H |
| OCaml Security Advisories | 5.7medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
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
| https://github.com/ocaml/opam/releases/tag/2.5.1 | release-notes | |
| https://github.com/ocaml/opam/pull/6897 | fix, issue-tracking, patch | |
| https://osv.dev/vulnerability/OSEC-2026-03 | exploit, third-party-advisory | |
| https://lists.debian.org/debian-lts-announce/2026/04/msg00021.html | mailing-list, third-party-advisory | |
| https://access.redhat.com/security/cve/CVE-2026-41082 | third-party-advisory, vdb-entry | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2459003 | issue-tracking | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41082.json | third-party-advisory | |
| https://github.com/ocaml/opam/pull/6898 | fix | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41082 changed 2026-07-15 | CVE Terms of Use |
| OCaml Security Advisories | OSEC-2026-03 changed 2026-11-06 | CC0-1.0 |
| NVD | CVE-2026-41082 changed 2026-10-26 | Public domain |