CVE-2026-41082
7.3OCaml · opam
A path traversal vulnerability in OCaml opam allows attackers to write files outside of the intended directory via malicious .install files.
Executive summary
A path traversal vulnerability in OCaml opam before version 2.5.1 permits unauthorized file system modification, posing a significant risk of arbitrary file integrity compromise.
Vulnerability
This vulnerability is a path traversal flaw (CWE-24) occurring when the package manager processes .install files. An attacker can craft a destination filepath containing directory traversal sequences to write files to arbitrary locations on the local system, requiring no specific user authentication.
Business impact
The ability to write arbitrary files to the file system allows for potential privilege escalation, code execution, or the corruption of critical system configuration files. With a CVSS score of 7.3, this high-severity flaw represents a significant risk to operational stability and system security, as it facilitates unauthorized control over the local environment where the package manager is executed.
Remediation
Immediate Action: Update the OCaml opam package manager to version 2.5.1 or later to incorporate the necessary path validation logic.
Proactive Monitoring: Review system logs for unusual file write operations, specifically monitoring for paths containing traversal sequences or modifications to sensitive system directories.
Compensating Controls: Ensure that the build or deployment process utilizing opam runs with the least privilege necessary, ideally within a containerized or isolated environment to limit the scope of potential file system damage.
Exploitation status
Public Exploit Available: No (exploit_available: unknown)
Analyst recommendation
Given the high-severity nature of this path traversal vulnerability and the existence of a proof-of-concept, prompt remediation is required. Administrators should prioritize updating the opam software across all development and production environments to version 2.5.1 to eliminate the underlying flaw and prevent potential unauthorized system modifications.