{"id":"CVE-2026-57825","aliases":["ALPINE-CVE-2026-57825","DEBIAN-CVE-2026-57825","EUVD-2026-74594","GHSA-rwq5-7hr3-r2qf","OSEC-2026-10","UBUNTU-CVE-2026-57825","openSUSE-SU-2026:11296-1","openSUSE-SU-2026:21380-1"],"status":"published","title":"In the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed...","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.","severity":{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00472,"percentile":0.41321,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-61"],"published":"2026-07-07T12:00:00Z","modified":"2026-11-06T13:45:03Z","fixes":[{"ecosystem":"Alpine:v3.23","package":"opam","fixed_in":["2.5.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"opam","fixed_in":["2.5.2-r0"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"opam","fixed_in":["2.1.2-1+deb12u2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"opam","fixed_in":["2.3.0-1+deb13u2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"opam","fixed_in":["2.5.2-1"],"sources":["osv"]},{"ecosystem":"opam","package":"opam-devel","fixed_in":["2.5.2"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"opam","fixed_in":["2.5.2-1.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.23","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-r0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.2-1+deb12u2"}]}],"versions":["2.1.2-1","2.1.2-1+deb12u1"]},{"source":"osv","ecosystem":"Debian:13","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.0-1+deb13u2"}]}],"versions":["2.3.0-1","2.3.0-1+deb13u1"]},{"source":"osv","ecosystem":"Debian:14","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-1"}]}],"versions":["2.3.0-1","2.4.1-1","2.5.0-1","2.5.1-1","2.5.1-2"]},{"source":"osv","ecosystem":"opam","package":"opam-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2"}]}],"versions":["2.0~alpha5","2.0.0~beta","2.0.0~beta3","2.0.0~beta3.1","2.0.0~beta5","2.0.0~rc","2.0.0~rc2","2.0.0~rc3","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9","2.0.10","2.1.0~beta2","2.1.0~beta4","2.1.0~rc","2.1.0~rc2","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6","2.2.0~alpha","2.2.0~alpha2","2.2.0~alpha3","2.2.0~beta1","2.2.0~beta2","2.2.0~beta3","2.2.0~rc1","2.2.0","2.2.1","2.3.0~alpha1","2.3.0~beta1","2.3.0~beta2","2.3.0~rc1","2.3.0","2.4.0~alpha1","2.4.0~alpha2","2.4.0~beta1","2.4.0~rc1","2.4.0","2.4.1","2.5.0~alpha1","2.5.0~beta1","2.5.0~rc1","2.5.0","2.5.1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.2.2-3","1.2.2-3build1","1.2.2-4"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.2.2-6"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.5-1","2.0.5-1ubuntu1","2.0.5-1ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.8-1","2.0.10-1","2.1.2-1","2.1.2-1+deb12u1build0.22.04.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.5-1","2.1.5-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.0-1","2.5.2-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.3.0-1","2.4.1-1","2.5.0-1","2.5.0-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-1.2"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"opam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-bp160.1.1"}]}],"bundled":2}],"products":[{"vendor":"ocaml","product":"opam"}],"references":[{"url":"https://github.com/ocaml/opam/releases","tags":["package"]},{"url":"https://osv.dev/vulnerability/OSEC-2026-10","tags":["web"]},{"url":"https://lists.debian.org/debian-lts-announce/2026/07/msg00026.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57825","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-rwq5-7hr3-r2qf"},{"url":"https://security.alpinelinux.org/vuln/CVE-2026-57825","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57825.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-57825","tags":["advisory"]},{"url":"https://github.com/ocaml/opam/pull/7005","tags":["fix","report"]},{"url":"https://github.com/ocaml/opam/pull/7006","tags":["fix"]},{"url":"https://ubuntu.com/security/CVE-2026-57825","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-57825","tags":["report"]},{"url":"https://github.com/ocaml/security-advisories/blob/main/advisories/2026/OSEC-2026-10.md","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-57825","tags":["web"]},{"url":"https://bugzilla.suse.com/1262281","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2026-41082","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-57825","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.","status":"published","published":"2026-09-09T00:00:00Z","modified":"2026-09-14T15:41:32.57Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-61"],"updated_at":"2026-11-02T13:43:56.024247Z"}],"euvd":[{"id":"EUVD-2026-74594","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.","status":"published","published":"2026-09-09T00:00:00Z","modified":"2026-09-14T15:41:32Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T17:28:20.426868Z"}],"ghsa":[{"id":"GHSA-rwq5-7hr3-r2qf","title":"In the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed...","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.","status":"published","published":"2026-09-09T06:31:37Z","modified":"2026-09-09T06:31:41Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-61"],"updated_at":"2026-11-02T15:11:37.523128Z"}],"nvd":[{"id":"CVE-2026-57825","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.","status":"published","published":"2026-09-09T04:18:01.72Z","modified":"2026-09-14T16:17:15.167Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-61"],"updated_at":"2026-11-02T14:12:45.612639Z"}],"osv":[{"id":"ALPINE-CVE-2026-57825","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.","status":"published","published":"2026-09-09T04:18:01.72Z","modified":"2026-11-03T06:32:58.081955822Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-03T07:16:09.603409Z"},{"id":"CVE-2026-57825","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.","status":"published","published":"2026-09-09T00:00:00Z","modified":"2026-10-28T02:30:59.289491176Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-61"],"updated_at":"2026-11-02T15:45:12.016252Z"},{"id":"DEBIAN-CVE-2026-57825","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.","status":"published","published":"2026-09-09T04:18:01.72Z","modified":"2026-10-01T03:03:27.486197904Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:57.590991Z"},{"id":"OSEC-2026-10","title":"opam install sandbox escape using symlinks","description":"## 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","status":"published","published":"2026-07-07T12:00:00Z","modified":"2026-11-06T13:45:03.916292686Z","cvss":[{"version":"3.0","score":5.7,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-06T14:15:36.655779Z"},{"id":"UBUNTU-CVE-2026-57825","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.","status":"published","published":"2026-09-09T04:18:00Z","modified":"2026-10-17T13:00:29.068525998Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T16:56:41.911783Z"},{"id":"openSUSE-SU-2026:11296-1","title":"opam-2.5.2-1.2 on GA media","description":"These are all security issues fixed in the opam-2.5.2-1.2 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-07-17T00:00:00Z","modified":"2026-07-18T08:45:07.12270384Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:21380-1","title":"Security update for opam","description":"This update for opam fixes the following issues:\n\nChanges in opam:\n\n- Update to version 2.5.2 (CVE-2026-57825)\n  see included CHANGES file for details\n\n- Update to version 2.5.1 (CVE-2026-41082 bsc#1262281)\n  see included CHANGES file for details\n\n- Update to version 2.5.0\n  see included CHANGES file for details\n","status":"published","published":"2026-07-18T19:33:53Z","modified":"2026-07-22T18:25:11.646205272Z","updated_at":"2026-11-02T16:58:41.885092Z"}]}}
