{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "24.0.9"
              },
              {
                "introduced": "25.0.0"
              },
              {
                "fixed": "36.0.10"
              },
              {
                "introduced": "37.0.0"
              },
              {
                "fixed": "44.0.2"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "97ebe818494ff0555e5a686af40342cacb896752"
            },
            {
              "introduced": "0b195ef5db76c02fb5392ec1418c58bdc5537d41"
            },
            {
              "fixed": "1f63867b4c09de72c740282f21c9cd91ac54eb83"
            },
            {
              "introduced": "7b3d6ae79e9153a2477668062f5622c10333925f"
            },
            {
              "fixed": "d02210b714962f2c66891a8ee9d5d034bfb626f1"
            },
            {
              "fixed": "377cd917af258d932d55b201a646917ecf193639"
            }
          ],
          "repo": "https://github.com/bytecodealliance/wasmtime",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-2r75-cxrj-cmph"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-284"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47261.json"
  },
  "details": "Wasmtime is a runtime for WebAssembly. In versions prior to 24.0.9, 36.0.10, and 44.0.2, when a filesystem preopen is given DirPerms::all() and FilePerms::READ without FilePerms::WRITE, this access control mechanism can be bypassed via the wasip2 descriptor.open-at or wasip1 path_open interfaces by opening a file with only the OpenFlags::TRUNCATE oflag. The root cause is that the clause handling OpenFlags::TRUNCATE in crates/wasi/src/filesystem.rs (Dir::open_at, lines 967–969) did not set open_mode |= OpenMode::WRITE;, which is later used for the access control check against FilePerms to determine whether opening the file is permitted; the single-line fix adds that missing assignment, after which the affected calls correctly fail with error-code.not-permitted and ERRNO_PERM respectively. Only wasmtime-wasi embeddings that combine DirPerms::MUTATE with FilePerms::READ are affected by this bug. In particular, the Wasmtime project's wasmtime-cli's use of wasmtime-wasi is not affected, because it always sets FilePerms::all() for all preopens. This issue has been fixed in versions 24.0.9, 36.0.10 and44.0.2.",
  "id": "CVE-2026-47261",
  "modified": "2026-07-08T05:36:16.062485979Z",
  "published": "2026-06-15T19:47:40.366Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9"
    },
    {
      "type": "WEB",
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10"
    },
    {
      "type": "WEB",
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47261.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-47261"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction"
}