From 3d6b1188e47e63f5c8307d8538072a5cfb6bccb0 Mon Sep 17 00:00:00 2001 From: Suradet Pratomsak Date: Wed, 5 Aug 2026 09:45:07 +0700 Subject: [PATCH 1/2] fix: add wasm-unsafe-eval to CSP script-src MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebAssembly.instantiateStreaming() requires 'wasm-unsafe-eval' in the CSP. This is more restrictive than 'unsafe-eval' — it only permits WASM compilation, not arbitrary eval(). --- SECURITY.md | 11 ++++++----- vercel.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index b6d95b5..cbc415f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -69,7 +69,7 @@ CSP directives enforced: ``` default-src 'none'; -script-src 'self' 'unsafe-inline'; +script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' blob:; font-src 'self'; @@ -82,10 +82,11 @@ No `unsafe-eval`. The `unsafe-inline` for styles is required by Leptos's CSR rendering. The `unsafe-inline` for scripts is required because Trunk generates an inline `