CVE-2026-41082
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to...
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
CVE-2026-41082- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-24, CWE-24
- Updated
- 2026-11-02
EUVDEUVD-2026-23288
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
EUVD-2026-23288- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-97q5-qf47-hvrw
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to...
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
GHSA-97q5-qf47-hvrw- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-22, CWE-24
- Updated
- 2026-11-02
NVD
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
CVE-2026-41082- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-24, CWE-22
- Updated
- 2026-11-02
OSV
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
CVE-2026-41082- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-24
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-41082
7.8
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
DEBIAN-CVE-2026-41082- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVOSEC-2026-03
5.7
opam install sandbox escape
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
- Record
OSEC-2026-03- CVSS 3.0
- 5.7 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-06
OSVUBUNTU-CVE-2026-41082
7.3
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.
- Record
UBUNTU-CVE-2026-41082- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2026-0116 No score
Updated opam packages fix security vulnerability
In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory. (CVE-2026-41082)
- Record
MGASA-2026-0116- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:10568-1 No score
opam-2.5.1-1.1 on GA media
These are all security issues fixed in the opam-2.5.1-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:10568-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:21380-1 No score
Security update for opam
This update for opam fixes the following issues:
Changes in opam:
-
Update to version 2.5.2 (CVE-2026-57825) see included CHANGES file for details
-
Update to version 2.5.1 (CVE-2026-41082 bsc#1262281) see included CHANGES file for details
-
Update to version 2.5.0 see included CHANGES file for details
- Record
openSUSE-SU-2026:21380-1- Updated
- 2026-11-02
OSVUSN-8256-1 No score
opam vulnerability
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.
- Record
USN-8256-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
opamDebian:12 |
before 2.1.2-1+deb12u1, plus listed versions 2.1.2-1 |
2.1.2-1+deb12u1 |
opamDebian:13 |
before 2.3.0-1+deb13u1, plus listed versions 2.3.0-1 |
2.3.0-1+deb13u1 |
opamDebian:14 |
before 2.5.1-1, plus listed versions 2.3.0-12.4.1-12.5.0-1 |
2.5.1-1 |
opamMageia:9 |
before 2.1.3-1.1.mga9 | 2.1.3-1.1.mga9 |
opam-developam |
before 2.5.1, plus listed versions 2.0~alpha52.0.0~beta2.0.0~beta32.0.0~beta3.12.0.0~beta5 Show 45 moreShow less2.0.0~rc2.0.0~rc22.0.0~rc32.0.02.0.12.0.22.0.32.0.42.0.52.0.62.0.72.0.82.0.92.0.102.1.0~beta22.1.0~beta42.1.0~rc2.1.0~rc22.1.02.1.12.1.22.1.32.1.42.1.52.1.62.2.0~alpha2.2.0~alpha22.2.0~alpha32.2.0~beta12.2.0~beta22.2.0~beta32.2.0~rc12.2.02.2.12.3.0~alpha12.3.0~beta12.3.0~beta22.3.0~rc12.3.02.4.0~alpha12.4.0~alpha22.4.0~beta12.4.0~rc12.4.02.4.1 |
2.5.1 |
opamUbuntu:16.04:LTS |
All versions, plus listed versions 1.2.2-31.2.2-3build11.2.2-4 |
None known |
opamUbuntu:18.04:LTS |
All versions, plus listed versions 1.2.2-6 |
None known |
opamUbuntu:Pro:20.04:LTS |
before 2.0.5-1ubuntu1+esm1, plus listed versions 2.0.5-12.0.5-1ubuntu1 |
2.0.5-1ubuntu1+esm1 |
opamUbuntu:22.04:LTS |
before 2.1.2-1+deb12u1build0.22.04.1, plus listed versions 2.0.8-12.0.10-12.1.2-1 |
2.1.2-1+deb12u1build0.22.04.1 |
opamUbuntu:Pro:24.04:LTS |
before 2.1.5-1ubuntu0.1~esm2, plus listed versions 2.1.5-1 |
2.1.5-1ubuntu0.1~esm2 |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
opamUbuntu:25.10 |
before 2.3.0-1+deb13u1build0.25.10.1, plus listed versions 2.3.0-1 |
2.3.0-1+deb13u1build0.25.10.1 |
opamUbuntu:26.10 |
All versions, plus listed versions 2.5.0-12.5.2-1 |
None known |
opamUbuntu:Pro:26.04:LTS |
before 2.5.0-1ubuntu0.1~esm1, plus listed versions 2.3.0-12.4.1-12.5.0-1 |
2.5.0-1ubuntu0.1~esm1 |
opamopenSUSE:Tumbleweed |
before 2.5.1-1.1 | 2.5.1-1.1 |
opamopenSUSE:Leap 16.0 From an advisory covering 2 CVEs |
before 2.5.2-bp160.1.1 | 2.5.2-bp160.1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-41082 is a high vulnerability (CVSS 7.3) in Ocaml Opam, published April 15, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.21%, the 10th percentile. Fixed in opam 2.1.2-1+deb12u1.
References
github.com/ocaml/opam/releases/tag/2.5.1
github.com/ocaml/opam/pull/6897
osv.dev/vulnerability/OSEC-2026-03
lists.debian.org/debian-lts-announce/2026/04/msg00021.html
access.redhat.com/security/cve/CVE-2026-41082
bugzilla.redhat.com/show_bug.cgi?id=2459003
Show 16 moreShow less
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41082.json
nvd.nist.gov/vuln/detail/CVE-2026-41082
github.com/advisories/GHSA-97q5-qf47-hvrw
github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41082.json
security-tracker.debian.org/tracker/CVE-2026-41082
advisories.mageia.org/MGASA-2026-0116.html
bugs.mageia.org/show_bug.cgi?id=35405
lists.debian.org/debian-security-announce/2026/msg00126.html
github.com/ocaml/opam/pull/6898
ubuntu.com/security/CVE-2026-41082
cve.org/CVERecord?id=CVE-2026-41082
github.com/ocaml/security-advisories/blob/main/advisories/2026/OSEC-2026-03.md
ubuntu.com/security/notices/USN-8256-1
suse.com/security/cve/CVE-2026-41082
bugzilla.suse.com/1262281
suse.com/security/cve/CVE-2026-57825
Left out here: 4 versions. The JSON record has them.