osec-2026-03

CVSS 5.7 osv_ocaml
Description

## Summary `.install` files do not validate whether they are inside the package area, and so can bypass sandboxing. ## Exploit In a `package.install` file, this installs a file as ``~/.bashrc`: ``` bin: [ "payload.sh" {"../../../.bashrc"} ] ``` ## Timeline - 2026-04-11: Anil forwarded the issue from Andrew Nesbitt to the OCaml security team - 2026-04-11: Kate developed a fix - 2026-04-15: opam 2.5.1 was released with the fix

Timeline
Published
unknown
Last Modified
unknown
CVSS Details

CVSS details not available.

Affected Products

No product information available.

Weaknesses (CWE)
References
Linked Vulnerabilities

No linked vulnerabilities found.

{
  "affected": [
    {
      "database_specific": {
        "source": "https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-03.json"
      },
      "ecosystem_specific": {
        "opam_constraint": "opam-devel {< \"2.5.1\"}"
      },
      "package": {
        "ecosystem": "opam",
        "name": "opam-devel",
        "purl": "pkg:opam/opam-devel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.5.1"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "d7283e3b5845447ee618794d87cfe224dd980c8f"
            }
          ],
          "repo": "https://github.com/ocaml/opam",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "c8fcf65779fe7048f9b5ef59886bfa9c5d102d84"
            }
          ],
          "repo": "https://github.com/ocaml/opam",
          "type": "GIT"
        }
      ],
      "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"
      ]
    }
  ],
  "aliases": [
    "CVE-2026-41082"
  ],
  "credits": [
    {
      "name": "Andrew Nesbitt",
      "type": "REPORTER"
    },
    {
      "name": "Kate",
      "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-03.md",
    "osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-03.json"
  },
  "details": "## Summary\n\n`.install` files do not validate whether they are inside the package area, and so can bypass sandboxing.\n\n## Exploit\n\nIn a `package.install` file, this installs a file as ``~/.bashrc`:\n```\nbin: [\n  \"payload.sh\" {\"../../../.bashrc\"}\n]\n```\n\n## Timeline\n\n- 2026-04-11: Anil forwarded the issue from Andrew Nesbitt to the OCaml security team\n- 2026-04-11: Kate developed a fix\n- 2026-04-15: opam 2.5.1 was released with the fix",
  "id": "OSEC-2026-03",
  "modified": "2026-04-16T21:00:00Z",
  "published": "2026-04-15T22:00:00Z",
  "references": [
    {
      "type": "FIX",
      "url": "https://github.com/ocaml/opam/pull/6897"
    },
    {
      "type": "FIX",
      "url": "https://github.com/ocaml/opam/pull/6898"
    }
  ],
  "schema_version": "1.7.5",
  "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"
}
View JSON API Download JSON