Interesting article here that predates the source code leak.
Here’s the wild part: Bun’s
nativeFetchmutates the JS string in place. Afterfetch()returns, the original body variable has different bytes than what you passed in. JavaScript strings are supposed to be immutable — this is a spec violation.
It gets worse. JSC (JavaScriptCore, the engine Bun uses) shares string backing stores across references. If you doconst alias = body, both variables point to the same memory. Afterfetch(), both are silently mutated. The same applies to Map/Set keys, interned strings, and rope substrings. Any code that coincidentally hascch=00000in a runtime string and fetches to a/v1/messagesURL — even on a different server — will get silently rewritten.
EDIT: I just realized, after going down a bit of a rabbit hole, that this article was written by someone working with Ellie Huxtable – the creator of Atuin ![]()