Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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.
AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
8DescriptionNVD
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.
Insufficient sanitisation in the OCaml compiler versions 4.04.0 and 4.04.1 allows external code to be executed with rais
OCaml before 4.03.0 does not properly handle sign extensions, which allows remote attackers to conduct buffer overflow a
The caml_ba_deserialize function in byterun/bigarray.c in the standard library in OCaml 4.06.0 has an integer overflow w
Signature verification bypass in the OCaml jose library (ulrikstrid/ocaml-jose) before 0.11.0 lets attackers forge valid
OCaml compiler allows attackers to have unspecified impact via unknown vectors, a similar issue to CVE-2017-9772 "but wi
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
Remote denial of service in the utcp OCaml TCP userspace library before version 0.0.6 is possible via crafted out-of-ord
Index mishandling in the OCaml cstruct library before 6.3.0 allows network-reachable attackers to trigger partial confid
ECDSA signature forgery is possible in mirage-crypto-ec before 2.2.0 for OCaml because the P256, P384, and P521 pub_of_o
Authenticated decryption in mirage-crypto before 2.2.0 for OCaml violates the security invariant of AEAD schemes by writ
Timing side-channel in mirage-crypto-ec before 2.4.0 for OCaml enables remote cryptographic key recovery by exploiting s
OCaml's Bigarray.reshape function contains an integer overflow vulnerability that permits unauthenticated local attacker
Same weakness CWE-24 – Path Traversal: '../filedir'
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-23288
GHSA-97q5-qf47-hvrw