Skip to main content
Vulnerability Database/CVE-2025-43853

CVE-2025-43853: WAMR Path Traversal Vulnerability

CVE-2025-43853 is a path traversal flaw in WebAssembly Micro Runtime that allows symlink following to escape sandbox restrictions on Windows. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-43853 Overview

CVE-2025-43853 is a symlink following vulnerability [CWE-61] in the WebAssembly Micro Runtime (WAMR) iwasm package. The flaw affects WAMR versions up to and including 2.2.0 running on Windows, as well as any WAMR build using libc-uvwasi. An attacker running WebAssembly code inside the runtime can create a symbolic link pointing outside the preopened sandbox directory. Opening that link with the create flag causes iwasm to write files on the host system outside the sandbox boundary. If the symlink targets an existing host file, the attacker can also open and read its contents. Version 2.3.0 fixes the issue.

Critical Impact

WebAssembly modules can escape the WASI filesystem sandbox on Windows, reading and writing arbitrary host files accessible to the iwasm process.

Affected Products

  • Bytecode Alliance WebAssembly Micro Runtime (WAMR) versions up to and including 2.2.0 on Windows
  • Any WAMR build configured with WAMR_BUILD_LIBC_UVWASI=1 (uvwasi implementation)
  • The iwasm executable binary distributed with the affected WAMR versions

Discovery Timeline

  • 2025-05-15 - CVE-2025-43853 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-43853

Vulnerability Analysis

The vulnerability resides in WAMR's WebAssembly System Interface (WASI) filesystem implementation when backed by uvwasi on Windows. WASI runtimes enforce a capability-based sandbox using preopened directories. Each file descriptor granted to a WebAssembly guest is scoped to a specific directory tree.

On Windows, the uvwasi backend does not correctly resolve symbolic links before performing filesystem operations. When a guest module creates a symlink inside a preopened directory and then opens the link with the create flag, iwasm follows the link to its target without verifying that the resolved path remains within the sandbox. The result is a filesystem sandbox escape that permits arbitrary file read and arbitrary file write with the privileges of the host process.

Root Cause

The root cause is insufficient path canonicalization during symlink resolution in the libc-uvwasi component on Windows. The upstream libuv/uvwasi dependency pinned by WAMR 2.2.0 (LIBUV_VERSION v1.46.0) lacked the sandboxing semantics required to safely contain untrusted WebAssembly code. The maintainers now explicitly document that uvwasi does not provide comprehensive filesystem security properties.

Attack Vector

Exploitation requires the ability to execute an untrusted WebAssembly module inside iwasm on a Windows host. The attack is local, requires no privileges, and no user interaction. The guest module creates a symlink inside a preopened directory whose target is an absolute path on the host filesystem, then invokes path_open with the create flag to materialize or read the target file.

text
// Patch excerpt: core/iwasm/libraries/libc-uvwasi/libc_uvwasi.cmake
set (LIBC_WASI_DIR ${CMAKE_CURRENT_LIST_DIR})

-set (LIBUV_VERSION v1.46.0)
+set (LIBUV_VERSION v1.51.0)

add_definitions (-DWASM_ENABLE_LIBC_WASI=1 -DWASM_ENABLE_UVWASI=1)

Source: Bytecode Alliance commit 28702ed

Detection Methods for CVE-2025-43853

Indicators of Compromise

  • Creation of symbolic links inside directories that iwasm has been configured to preopen with the --dir= flag.
  • Unexpected file creation or modification on Windows hosts running iwasm, outside the intended sandbox directories.
  • Read access by the iwasm.exe process to sensitive host paths such as C:\Users\<user>\ or C:\Windows\System32\ that fall outside configured preopens.

Detection Strategies

  • Inventory all Windows systems running WAMR and query build metadata for WAMR_BUILD_LIBC_UVWASI=1 or versions ≤ 2.2.0.
  • Enable Windows filesystem auditing (SACL) on directories outside the intended sandbox to log access attempts by iwasm.exe.
  • Monitor Sysmon Event ID 11 (FileCreate) and Event ID 1 (ProcessCreate) for iwasm.exe writing files outside expected paths.

Monitoring Recommendations

  • Alert on any symlink creation events (CreateSymbolicLinkW) initiated by processes hosting the WAMR runtime.
  • Baseline the expected filesystem footprint of each WebAssembly workload and alert on deviations.
  • Forward iwasm process telemetry and Windows Security logs to a centralized analytics platform for correlation across hosts.

How to Mitigate CVE-2025-43853

Immediate Actions Required

  • Upgrade WAMR to version 2.3.0 or later, which bumps the libuv dependency to v1.51.0 and adds explicit warnings about uvwasi sandboxing limitations.
  • Treat any WAMR deployment on Windows as capable of executing untrusted code only after upgrading and reassessing the threat model.
  • Audit all preopened directories passed to iwasm and remove any that contain or are adjacent to sensitive host data.

Patch Information

The fix was committed in Bytecode Alliance commit 28702ed and released in WAMR 2.3.0. Full details are available in GitHub Security Advisory GHSA-8fc8-4g25-c8m7. The patch also updates build-scripts/config_common.cmake to warn operators that libc-uvwasi should not be used to run untrusted code.

Workarounds

  • Do not run untrusted WebAssembly modules in iwasm builds using libc-uvwasi until upgraded.
  • Rebuild WAMR with WAMR_BUILD_LIBC_WASI=1 instead of WAMR_BUILD_LIBC_UVWASI=1 on platforms where the standard WASI backend is available.
  • Run iwasm under a low-privilege Windows account with filesystem ACLs that restrict access to only the directories required by the workload.
bash
# Rebuild WAMR without the uvwasi backend
cmake -S . -B build \
  -DWAMR_BUILD_LIBC_UVWASI=0 \
  -DWAMR_BUILD_LIBC_WASI=1
cmake --build build --config Release

# Verify installed version is 2.3.0 or later
iwasm --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.