GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration
osec-2026-03
Vulnerability from osv_ocaml
Published
2026-04-15 22:00
Modified
2026-04-16 21:00
Summary
opam install sandbox escape
Details

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

{
  "affected": [
    {
      "ecosystem_specific": {
        "opam_constraint": "opam-devel {\u003c \"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.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"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

Loading…

Detection rules are retrieved from Rulezet.

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.


Loading…