🔍 CVE-2026-35186

7.5
CVSS Score
HIGH
2026-04-09
2026-10-26 22:10
✅ 완료

🇰🇷 한글 설명

Wasmtime의 Winch 컴파일러 백엔드에서 table.grow 연산을 변환할 때 결과값의 타입이 잘못 지정되는 버그가 존재합니다. 이로 인해 서비스 거부(DoS) 유발, 컴파일러 정확성 문제, 그리고 선형 메모리 앞 최대 16바이트의 호스트 메모리 누출 가능성이 있습니다. 기본 컴파일러인 Cranelift 및 기본 설정(가드 페이지 활성화)에서는 영향을 받지 않습니다.

💡 쉬운 설명

WebAssembly 실행 엔진 Wasmtime의 Winch 컴파일러에 결함이 있어, 악성 WebAssembly 코드가 프로그램을 강제로 종료시킬 수 있습니다. 특정 설정에서는 호스트 메모리의 일부가 노출될 위험도 있습니다.

🇺🇸 원문 (English)

Wasmtime is a runtime for WebAssembly. From 25.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime's Winch compiler backend contains a bug where translating the table.grow operator causes the result to be incorrectly typed. For 32-bit tables this means that the result of the operator, internally in Winch, is tagged as a 64-bit value instead of a 32-bit value. This invalid internal representation of Winch's compiler state compounds into further issues depending on how the value is consumed. The primary consequence of this bug is that bytes in the host's address space can be stored/read from. This is only applicable to the 16 bytes before linear memory, however, as the only significant return value of table.grow that can be misinterpreted is -1. The bytes before linear memory are, by default, unmapped memory. Wasmtime will detect this fault and abort the process, however, because wasm should not be able to access these bytes. Overall this this bug in Winch represents a DoS vector by crashing the host process, a correctness issue within Winch, and a possible leak of up to 16-bytes before linear memory. Wasmtime's default compiler is Cranelift, not Winch, and Wasmtime's default settings are to place guard pages before linear memory. This means that Wasmtime's default configuration is not affected by this issue, and when explicitly choosing Winch Wasmtime's otherwise default configuration leads to a DoS. Disabling guard pages before linear memory is required to possibly leak up to 16-bytes of host data. This vulnerability is fixed in 36.0.7, 42.0.2, and 43.0.1.

📍 영향받는 시스템

Wasmtime 25.0.0 이상 36.0.7 미만, 42.0.2 미만, 43.0.1 미만 버전 중 Winch 백엔드를 명시적으로 사용하는 환경

⚔️ 공격 벡터

악성 WebAssembly 모듈이 table.grow 연산을 호출하여 Winch 컴파일러의 잘못된 타입 처리를 유발하고, 호스트 프로세스 중단 또는 가드 페이지 비활성화 시 메모리 일부 읽기/쓰기를 시도

🛡️ 대응 방법

Wasmtime을 36.0.7, 42.0.2, 43.0.1 이상 버전으로 업데이트하거나, Winch 대신 기본 컴파일러인 Cranelift를 사용하고 가드 페이지 설정을 유지

🔧 검증 코드

출력된 버전이 36.0.7 미만(25.x~35.x), 42.0.0~42.0.1, 43.0.0이면 취약하며, 해당 버전 이상이면 패치된 것입니다.

Shell / Script
wasmtime --version 2>/dev/null || cargo pkgid wasmtime 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H