The vulnerability is a race condition in SandboxJS that allows for an execution-quota bypass. The root cause is the use of a globally shared variable, currentTicks.current, to track the execution ticks for different sandboxes. The function _execNoneRecurse in src/executor.ts would set this global variable each time a sandbox executed code. The vulnerability is triggered when using timers with string handlers (e.g., setTimeout("code", ...)). These handlers are compiled just before execution, not when they are scheduled. This compilation process involves functions like sandboxFunction, sandboxAsyncFunction, and sandboxedEval from src/eval.ts. These functions would read the currentTicks.current value to get the execution budget. In a concurrent environment, if Sandbox A schedules a timer and then Sandbox B runs before the timer fires, Sandbox B's execution will set currentTicks.current to its own tick object. When Sandbox A's timer finally executes, its code is compiled using Sandbox B's tick budget, effectively bypassing the quota set for Sandbox A. The patch resolves this by removing the global currentTicks object entirely and instead passing the correct tick object through the execution context (context.ctx.ticks), ensuring each sandbox's execution is tracked against its own budget.