Skip to main content

OCaml opam CVE-2026-41082

| EUVDEUVD-2026-23288 HIGH
Path Traversal: '../filedir' (CWE-24)
2026-04-16 mitre GHSA-97q5-qf47-hvrw
7.8
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI
7.3 HIGH

Local install-time file-write primitive needing victim interaction (UI:R, AV:L); high integrity/availability impact from arbitrary writes, only limited confidentiality since it is a write, not a read.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
7.3 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
Red Hat
7.1 HIGH
qualitative

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

8
Source Code Evidence Fetched
Jul 24, 2026 - 07:30 vuln.today
Analysis Generated
Jul 24, 2026 - 07:30 vuln.today
CVSS changed
Jul 08, 2026 - 03:37 NVD
7.3 (HIGH) 7.8 (HIGH)
Patch released
Apr 21, 2026 - 10:16 nvd
Patch available
Patch available
Apr 16, 2026 - 19:16 EUVD
EUVD ID Assigned
Apr 16, 2026 - 18:00 euvd
EUVD-2026-23288
CVE Published
Apr 16, 2026 - 17:32 nvd
HIGH 7.8
CVE Published
Apr 16, 2026 - 17:32 nvd
HIGH 7.3

DescriptionNVD

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

AnalysisAI

Arbitrary file write in OCaml opam before 2.5.1 allows a malicious package to escape its intended installation scope: a destination filepath in a package's .install field can contain ../ sequences to reach parent directories and drop files outside the target prefix. Exploitation requires a user to install a crafted opam package, so it is a supply-chain/local vector rather than a remote one. Tracked as OSEC-2026-03 and fixed in opam 2.5.1; no public exploit identified at time of analysis and EPSS is negligible (0.01%).

Technical ContextAI

opam is the standard package manager for the OCaml ecosystem. When installing a package, opam processes the .install file, which declares source-to-destination file mappings that place build artifacts (binaries, libraries, docs, config) into the switch or system prefix. The root cause is CWE-24 (Path Traversal: '../filedir'): opam did not properly validate or normalize destination paths, so a ../ component in a declared destination allowed the resolved write target to escape the intended scope. The fix (#6897) invalidates .install fields whose destination filepaths attempt to escape their scope and hardens OpamFilename.might_escape, including correct treatment of / as a separator on Windows. The affected CPE is cpe:2.3:a:ocaml:opam:*:*:*:*:*:*:*:* for all versions prior to 2.5.1.

RemediationAI

Vendor-released patch: opam 2.5.1 - upgrade to 2.5.1 or later, which invalidates .install fields whose destination filepaths escape their scope (PR https://github.com/ocaml/opam/pull/6897, release https://github.com/ocaml/opam/releases/tag/2.5.1). For distribution installs, apply the Debian LTS update (https://lists.debian.org/debian-lts-announce/2026/04/msg00021.html) or the Red Hat fix once shipped (https://access.redhat.com/security/cve/CVE-2026-41082). Until upgraded, the practical compensating control is to install only packages from trusted repositories and pinned sources and to avoid installing untrusted or unaudited opam packages, since the vulnerability triggers during package installation; where feasible, run installs under an unprivileged user and in isolated/containerized switches so that a traversal write cannot reach sensitive system paths - the trade-off is added workflow friction and it does not prevent damage within the reachable filesystem scope of that user.

More in Ocaml

View all
CVE-2017-9772 CRITICAL
9.8 Jun 23

Insufficient sanitisation in the OCaml compiler versions 4.04.0 and 4.04.1 allows external code to be executed with rais

CVE-2015-8869 CRITICAL
9.1 Jun 13

OCaml before 4.03.0 does not properly handle sign extensions, which allows remote attackers to conduct buffer overflow a

CVE-2018-9838 CRITICAL
9.8 Apr 06

The caml_ba_deserialize function in byterun/bigarray.c in the standard library in OCaml 4.06.0 has an integer overflow w

CVE-2026-89086 CRITICAL
9.1 Sep 10

Signature verification bypass in the OCaml jose library (ulrikstrid/ocaml-jose) before 0.11.0 lets attackers forge valid

CVE-2017-9779 HIGH
7.8 Sep 07

OCaml compiler allows attackers to have unspecified impact via unknown vectors, a similar issue to CVE-2017-9772 "but wi

CVE-2026-28364 HIGH
7.8 Feb 27

Heap memory corruption in the OCaml runtime (before 4.14.3 and 5.x before 5.4.1) lets an attacker who can feed crafted M

CVE-2026-87734 HIGH
7.5 Sep 09

Remote denial of service in the utcp OCaml TCP userspace library before version 0.0.6 is possible via crafted out-of-ord

CVE-2026-89087 HIGH
7.3 Sep 10

Index mishandling in the OCaml cstruct library before 6.3.0 allows network-reachable attackers to trigger partial confid

CVE-2026-87733 MEDIUM
6.2 Sep 09

ECDSA signature forgery is possible in mirage-crypto-ec before 2.2.0 for OCaml because the P256, P384, and P521 pub_of_o

CVE-2026-87732 MEDIUM
6.2 Sep 09

Authenticated decryption in mirage-crypto before 2.2.0 for OCaml violates the security invariant of AEAD schemes by writ

CVE-2026-87737 MEDIUM
5.9 Sep 09

Timing side-channel in mirage-crypto-ec before 2.4.0 for OCaml enables remote cryptographic key recovery by exploiting s

CVE-2026-34353 MEDIUM
5.9 Mar 27

OCaml's Bigarray.reshape function contains an integer overflow vulnerability that permits unauthenticated local attacker

Vendor StatusVendor

SUSE

Severity: High
Product Status
openSUSE Tumbleweed Fixed

Share

CVE-2026-41082 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy