workerd is vulnerable to Use-After-Free
50
Medium Risk
Native jsg::Function objects in the workerd runtime can free themselves while they are still being invoked. jsg::Function::operator() called native functions through a bare reference into the owning Ref, so a native callback that runs JavaScript can drop that reference mid-call and leave a dangling pointer on the stack. The reachable case is TextEncoderStream, whose transform algorithm is a native lambda: a user-supplied toString() that cancels the readable side can clear the algorithms and free the function while it is still executing. Before the fix this use-after-free can crash the host process or corrupt runtime memory. The fix holds a reference for the duration of the call so the function is not accessed after it has been freed.
You are affected if you are using a version that falls within the vulnerable range.
workerd is vulnerable to Use-After-Free in versions 0.0.1 - 1.20260804.1.
Upgrade the workerd library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.