6/11/2026 at 4:09:08 AM
I'm unreasonably excited about WASI. WASI is the thing which takes WebAssembly from a tool for running stuff in a browser to a tool that can run entire portable sandboxed applications on a computer - with controlled filesystem and network access.I don't ever want to run untrusted code from the internet outside of a sandbox ever again. If WASI lives up to its full potential I won't have to - we'll have a robust, cross-platform sandboxing solution for running real applications.
by simonw
6/11/2026 at 5:35:21 AM
> I don't ever want to run untrusted code from the internet outside of a sandbox ever againWASM is great, but I think it's a wrong approach for sandboxing problem. It's technically possible to sandbox native applications (compiled into target machine code) using OS-builtin mechanisms, but it's not done for compatibility reasons, because this is the way things were done last 50 years or so.
by Panzerschrek
6/11/2026 at 5:50:00 AM
sandboxing native apps just gives you security. with wasm you also get a single portable binary that can run on x86 windows, arm64 linux and in your browser with zero modification. you dont need to write platform specific code or use third party frameworks.by tancop
6/11/2026 at 6:19:19 AM
> you dont need to write platform specific codeYou don't need to write platform-specific code if you use some cross-platform framework. For simple programs it may be enough to use only the standard library of your language of choice.
> single portable binary that can run on x86 windows, arm64 linux and in your browser with zero modification
It has little value. Compiling a separate binary for each OS isn't that hard, since only a handful of architectures and operating systems are actually in use. Using an abstract cross-platform binary (like WASM) in the other hand adds extra performance costs and other user-side overhead, which isn't strictly necessary.
by Panzerschrek
6/11/2026 at 6:49:31 AM
No you don't, because WASM is only compute, and you need exactly runtime specific code and third party frameworks for everything else as imported functions.by pjmlp
6/11/2026 at 9:30:03 AM
That's what WASI is forby hmry
6/11/2026 at 11:22:59 AM
And like CORBA, or POSIX, the portability does not work 100% as being sold.by pjmlp
6/11/2026 at 6:19:49 AM
Exactly. It is entirely a misconception to believe that WASM is this silver bullet on sandboxing and it is not that great security-wise I’m afraid.It is only now being inspected by researchers and attackers who have found sandbox escapes [0] (chrome 0day), out-of-bounds [1] / use-after-free [2] and many other [3] flaws [4] in WebAssembly which I also agree that it is not enough for sandboxing at all.
[0] https://nvd.nist.gov/vuln/detail/CVE-2026-11645
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=2009901
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=2013741
[3] https://www.miggo.io/vulnerability-database/cve/CVE-2026-269...
[4] https://github.com/bytecodealliance/wasm-micro-runtime/secur...
by rvz
6/11/2026 at 7:48:43 AM
There's no reason to believe that [0] has anything to do with WASM, [1] and [2] are runtime implementation bugs, [3] is a vulnerability in a "weak" sandboxing library VM2 - it has nothing to do with WASM as such, and [4] is another implementation bug in an experimental WASI feature of that specific runtime which is gated behind a build flag.------
[Re: 3] https://github.com/patriksimek/vm2
> vm2 attempts to sandbox untrusted JavaScript code within the same Node.js process as your application. It does this through a complex network of Proxies that intercept and mediate every interaction between the sandbox and the host environment.
> JavaScript is an extraordinarily dynamic language. Objects can be accessed through prototype chains, constructors can be reached via error objects, symbols provide protocol hooks, and async execution creates timing windows. The sheer number of ways to traverse from one object to another in JavaScript makes building an airtight in-process sandbox extremely difficult.
[Re: 4] https://github.com/search?q=repo%3Abytecodealliance%2Fwasm-m...
by dns_snek
6/11/2026 at 6:31:06 AM
Those are not flaws in WASM itself, but in different WASM runtimes.by hobofan
6/11/2026 at 8:45:39 AM
Might as well run java or flash.by GoblinSlayer
6/11/2026 at 9:09:05 AM
But WASM is "lawnmower not included"!by DonHopkins
6/11/2026 at 6:46:25 AM
Use cases I am more excited about:1) Replace webhooks in web apps with wasm binaries provided by the customer, but that run in the web app servers.
2) Safer plugin system for professional software (plugins for photoshop, plugins for IDEs, etc)
3) Safer mod system for games and server-side mods that run on the game-maker server.
by DanielHB
6/11/2026 at 7:24:09 AM
We had that in the 90's with Java. Why would this approach succeed today?by bzzzt
6/11/2026 at 8:14:51 AM
Why wouldn't it? It's a different technology stack, developed with the benefit of decades of additional experience running hostile code on the web.by simonw
6/11/2026 at 8:43:58 AM
You mean like the CLR?Kind of strange that such experience still allows for WASM to be the target of C and C++ compilers, and there is no bounds checking support inside linear memory regions.
by pjmlp
6/11/2026 at 3:36:40 PM
WASM sandbox is miles better than the JVMWASI is a standard on where to poke holes on the sandbox for your specific use-case
WASM+WASI as a compilation target allows any program written for modern operating systems to work on any WASM runtime
by DanielHB
6/11/2026 at 11:02:11 AM
Because Java is a language, not a compilation target?by dtj1123
6/11/2026 at 12:53:48 PM
From the introduction section of the Java specification [1]:"The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating system-independence, the small size of its compiled code, and its ability to protect users from malicious programs."
[1] https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-1.h...
by ptx
6/11/2026 at 3:45:07 PM
From the same link, opening sentence:"The Java® programming language is a general-purpose, concurrent, object-oriented language."
Edit: Having thought a little, I appreciate that it's possible to compile for the JVM from source code which is not Java, which makes the JVM a compilation target. As far as I'm aware the JVM doesn't have first class support for this though, It's been tacked on as an afterthought. Compiling C to JVM bytecode for example doesn't appear to be an enjoyable process. WASM on the other hand was designed explicity to function as a compilation target for arbitrary languages.
Maybe I'm missing something, happy to be proven wrong.
by dtj1123
6/11/2026 at 4:17:07 PM
There are (or have been) lots of languages using the JVM as a compilation target, whether it is well-suited for this or not. Wikipedia has a partial list: https://en.wikipedia.org/wiki/List_of_JVM_languagesby ptx
6/11/2026 at 6:27:53 PM
My point is that it isn't well suited for it. Hence WASM.by dtj1123
6/11/2026 at 7:27:53 AM
Check out https://extism.org, it is built for those kinds of use cases. However I think WASI and components could enhance it.by crabmusket
6/11/2026 at 8:57:04 AM
sorry I meant "most excited about", WASI and components should be useful for the usecases I mentioned too.For example a SaaS services that accepts WASM plugins could provide a WASI that lets the plugin write to a object-store filesystem (like AWS S3) provided by the SaaS owner.
by DanielHB
6/11/2026 at 6:59:03 AM
i had this same vision when i created hyper-mcp with modular plugin system via WASM plugins. Too bad, the community moves on from MCP to CLI with coding agentby tuananh
6/11/2026 at 6:26:28 AM
Hey, this is also my interest. I was just looking into whether it was possible to e.g. build an archive extractor that runs like a normal program but does the actual extraction completely in wasm. Unfortunately, AFAICT it's possible but requires custom code; you can't (yet, I hope) just compile unzip/libarchive/whatever with CC=wasicompiler and get a sandboxed binary. But we're getting close.by yjftsjthsd-h
6/11/2026 at 7:03:15 AM
What do you mean? You absolutely can run compression in WASM.For example here is Gzip in WASM: https://github.com/ColinTimBarndt/wasm-gzip
by nl
6/11/2026 at 7:49:54 AM
You should be able to do exactly that though? Why do you think you can't?You will of course need to include a lot of support code to provide the relevant syscalls and otherwise emulate the environment that the code expects. But there are plenty of examples of that at this point.
by fc417fc802
6/12/2026 at 3:53:57 AM
Yeah, it's all that support code that I don't want to write. I want to (roughly) just tar -xf unzip.tar.gz && cd unzip
./configure CC=wasmcc
make
wasmruntime unzip.wasm testfile.zip
by yjftsjthsd-h
6/11/2026 at 5:44:02 AM
I'm curious if people have a good story for why WASI will succeed where Java failedby wyager
6/11/2026 at 5:57:33 AM
My main one is that WASI has benefitted from an additional 31 years of accumulated industry-wide experience compared to when Java was first released.by simonw
6/11/2026 at 9:11:06 AM
Plus, Larry Ellison doesn't own WASM: "Lawnmower Not Included"!by DonHopkins
6/11/2026 at 8:45:12 AM
So where has the experience gone in the support of C and C++ for WASM?by pjmlp
6/11/2026 at 6:23:11 AM
Programs written in Java require installation of a middleware called Java runtime. It adds extra friction for end-users. And even if one has Java runtime installed, a newer version may be necessary for a recently-published application.With WASM it may be the same, unless al major OS vendors integrate a WASM runtime so that it doesn't need to be installed separately.
by Panzerschrek
6/11/2026 at 6:51:51 AM
It is exactly the same for WASM outside of the browser, and Java has Android as counter part to built in runtime.by pjmlp
6/11/2026 at 7:02:37 AM
Yes, but inside the browser is a freaking big use case.by auggierose
6/11/2026 at 7:05:13 AM
Not really, I don't need COM / CORBA on the browser.by pjmlp
6/13/2026 at 4:58:36 AM
Good for you! In other words, you don't write compute heavy applications for the browser?I never used COM or CORBA, by the way, just too freaking ugly.
by auggierose
6/11/2026 at 9:22:48 AM
Java's vm does not start in milliseconds nor has dozen independent implementations in every ecosystemby afiori
6/11/2026 at 11:18:21 AM
Folks tend to think only Oracle does Java, and the only place to get it is from https://www.java.com.Maybe they should broaden their horizons.
https://en.wikipedia.org/wiki/List_of_Java_virtual_machines
And some like PTC or microEJ are missing from the list.
by pjmlp
6/11/2026 at 7:26:54 PM
>And even if one has Java runtime installed, a newer version may be necessary for a recently-published application.WASM doesn't remove version churn, the linked article literally discusses a newer version. Oh and the wonderful web compat story.
by GoblinSlayer
6/11/2026 at 9:01:17 AM
> It adds extra friction for end-usersIt doesn't have to, the program can bundle its own jre as its often the case, and then you also don't have to worry about jre compatibility. Downside is then you have many jres installed and of course you can't trust their sandboxing.
by tpm
6/11/2026 at 7:25:33 AM
> Programs written in Java require installation of a middleware called Java runtime. It's possible to link or embed a Java runtime in an existing application.by bzzzt
6/11/2026 at 9:20:11 AM
Because Java was doing nothing similar, a better comparison would be .NET CLR that actually tried to be a decent compilation target.Also security, Java has reflection so you cannot reliably sandbox java libraries
by afiori
6/11/2026 at 6:28:21 AM
My main one is: distribution & access. If major browsers implement the WASI runtime then using and distributing a WASI app will be way simpler than the Java equivalent ever was.by fla
6/11/2026 at 6:54:23 AM
The thing that interests me the most is that execution is deterministic. If the inputs to a WASM module are logged you get durable execution and rr style reverse debugging as part of the package.by grayrest
6/11/2026 at 8:23:08 PM
If you're interested in this, then you should check out https://github.com/golemcloud/golemGolem is a durable workflow platform and can run any wasm.
by sideeffffect
6/11/2026 at 7:40:40 AM
Sorry but how exactly does the sandboxing help? You download and run an app that you expect to be useful and that you need. The app needs permission to access your data. If you want to use the application what choice do you have except to grant it access?Point being you wouldn't run untrusted code in the first place and for "trusted code" you end up accepting it's access requirements anyway.
So logically I'd think that the malware would just get piggy bagged into actual non-obvious utility apps and nothing is gained.
Second problem is that the security model hoops make for terrible APIs and user experiences. Just look at the current filesystem browser APIs. It must be mentally challenging to design APIs to Be usable and the nerf them for security purposes to make them "not too usable".
Finally one must note that at least right now the webasm ecosystem is rather immature and the de-facto only tool (emscripten) is an amateur hour hobby project. So it's going to take some decades still before the tooling is really getting there.
by samiv
6/11/2026 at 9:13:18 AM
> The app needs permission to access your data. If you want to use the application what choice do you have except to grant it access?But it doesn't need network access to be useful, so it doesn't have that permission and can't exfiltrate your data?
by eviks
6/11/2026 at 12:01:54 PM
https://learn.microsoft.com/en-us/windows/security/applicati...by pjmlp
6/11/2026 at 12:12:27 PM
In general, what's three point of a link to a sandbox in a conversation about the benefits of sanboxingmBut specifically, this sandbox also kills all interop with your system, other apps/utilities, so way too disruptive for the purpose of isolating just from the network.
by eviks
6/11/2026 at 3:02:52 PM
Just like any WebAssembly runtime, without imports of external functions, the code can only warm CPUs.by pjmlp
6/11/2026 at 3:08:07 PM
So? Will they not have imports of external functions?by eviks
6/11/2026 at 3:40:01 PM
The point being that WASM doesn't improve anything over sandoxing native applications, on the OSes that actually are serious about it.It should confine itself as the evolution from browser plugins.
by pjmlp
6/11/2026 at 4:19:41 PM
So it does improve since the OSes are not actually serious about it otherwise they would've fixed these basic usability concerns years ago.by eviks
6/11/2026 at 6:10:51 PM
I haven't said such thing.by pjmlp
6/11/2026 at 6:56:15 AM
I like the technical design of WASM, but I feel that better OS sandboxes for regular native code will be the common approach to running untrusted code.As soon as you compile to WASM you no longer have the C FFI and the ability to call the OS systems interfaces for files, network and others.
It is extra work to move something to WASM vs just compiling it and running it in a sandbox.
by emadda
6/11/2026 at 8:22:12 AM
Why not just run a vm?by pistoriusp
6/11/2026 at 8:35:27 AM
Far more overhead.by AndrewDucker
6/11/2026 at 1:09:01 PM
In particular (as I just learned when looking it up), WASM can dynamically allocate host memory with the memory.grow instruction, so you don't have to waste a huge chunk of statically allocated memory per VM: https://developer.mozilla.org/en-US/docs/WebAssembly/Referen...Although... it doesn't say anything about releasing memory back to the host (I don't see a memory.shrink instruction) so maybe it's not all that helpful? Will WASM applications continue hogging the maximum amount of memory they've ever used until they're restarted?
A VM could release memory back to the host using memory ballooning, but this has to be managed manually somehow, at least with QEMU.
by ptx