Every CVE Search/ Get API key

CVE-2026-41082

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

7.3 HighFix available

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

0.21%Up 0.2 points since Apr 17, 2026
90%50%10%1%

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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
CVSS 3.1
7.1 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 3.1
7.1 HighCVSS: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 HighCVSS: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 HighCVSS: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 MediumCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
CVSS 3.1
7.1 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
CVSS 3.1
7.8 HighCVSS: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

Affected packages
PackageAffectedFixed
opam
Debian:12
before 2.1.2-1+deb12u1, plus listed versions
2.1.2-1
2.1.2-1+deb12u1
opam
Debian:13
before 2.3.0-1+deb13u1, plus listed versions
2.3.0-1
2.3.0-1+deb13u1
opam
Debian:14
before 2.5.1-1, plus listed versions
2.3.0-12.4.1-12.5.0-1
2.5.1-1
opam
Mageia:9
before 2.1.3-1.1.mga9
2.1.3-1.1.mga9
opam-devel
opam
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 less
2.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
opam
Ubuntu:16.04:LTS
All versions, plus listed versions
1.2.2-31.2.2-3build11.2.2-4
None known
opam
Ubuntu:18.04:LTS
All versions, plus listed versions
1.2.2-6
None known
opam
Ubuntu: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
opam
Ubuntu: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
opam
Ubuntu: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
Affected packages
PackageAffectedFixed
opam
Ubuntu: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
opam
Ubuntu:26.10
All versions, plus listed versions
2.5.0-12.5.2-1
None known
opam
Ubuntu: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
opam
openSUSE:Tumbleweed
before 2.5.1-1.1
2.5.1-1.1
opam
openSUSE:Leap 16.0
From an advisory covering 2 CVEs
before 2.5.2-bp160.1.1
2.5.2-bp160.1.1

History

History
RecordedChangedSources
affectedOSV
affected, facts
first indexedCVE 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

Show 16 moreShow less
This page doesn't list everything

Left out here: 4 versions. The JSON record has them.

MoveEnter Open