← Back to CVE Explorer

CVE-2026-47261

Full vulnerability record from the local CVENow database.

Description

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.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-06-15 21:17:11.153000
Last modified
2026-10-25 23:10:00.167000
View original CVE JSON
{
  "id": "CVE-2026-47261",
  "sourceIdentifier": "[email protected]",
  "published": "2026-06-15T21:17:11.153",
  "lastModified": "2026-10-25T23:10:00.167",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "Wasmtime es un entorno de ejecución para WebAssembly. En versiones anteriores a la 24.0.9, 36.0.10 y 44.0.2, cuando a una preapertura del sistema de archivos se le otorgan DirPerms::all() y FilePerms::READ sin FilePerms::WRITE, este mecanismo de control de acceso puede ser eludido a través de las interfaces wasip2 descriptor.open-at o wasip1 path_open abriendo un archivo con solo el indicador OpenFlags::TRUNCATE. La causa raíz es que la cláusula que maneja OpenFlags::TRUNCATE en crates/wasi/src/filesystem.rs (Dir::open_at, líneas 967-969) no estableció open_mode |= OpenMode::WRITE;, lo cual se usa posteriormente para la verificación de control de acceso contra FilePerms para determinar si se permite abrir el archivo; la corrección de una sola línea añade esa asignación faltante, después de lo cual las llamadas afectadas fallan correctamente con error-code.not-permitted y ERRNO_PERM respectivamente. Solo las incrustaciones de wasmtime-wasi que combinan DirPerms::MUTATE con FilePerms::READ se ven afectadas por este error. En particular, el uso de wasmtime-wasi por parte de wasmtime-cli del proyecto Wasmtime no se ve afectado, porque siempre establece FilePerms::all() para todas las preaperturas. Este problema ha sido solucionado en las versiones 24.0.9, 36.0.10 y44.0.2."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "bytecodealliance",
          "product": "wasmtime",
          "versions": [
            {
              "version": ">= 37.0.0, < 44.0.2",
              "status": "affected"
            },
            {
              "version": ">= 25.0.0, < 36.0.10",
              "status": "affected"
            },
            {
              "version": "< 24.0.9",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-16T12:45:55.792446Z",
          "id": "CVE-2026-47261",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-284"
        }
      ]
    },
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
              "versionEndExcluding": "24.0.9",
              "matchCriteriaId": "E199A623-C250-4390-88C5-3D3567BE2A3F"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
              "versionStartIncluding": "25.0.0",
              "versionEndExcluding": "36.0.10",
              "matchCriteriaId": "C92872A6-C672-43D5-98AB-BB9E5A9D10A5"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
              "versionStartIncluding": "37.0.0",
              "versionEndExcluding": "44.0.2",
              "matchCriteriaId": "31F391A3-BB50-4827-A6F3-59175BBEB1FD"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph",
      "source": "[email protected]",
      "tags": [
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}