Skip to content
Memory corruption Disclosed report Advanced CVE-2026-4701

Assertion failure: p, at debugger/DebugScript.cpp:116

Gary Kwong Follow

Originally disclosed on Mozilla

  • Fixed in 5 days
  • Paid in 13 days
  • Disclosed after 5 days
Text
Created attachment 9536523
debug stack

'''js
gczeal(23);
callFunctionWithAsyncStack(
  function () {
    for (var i = String; --i; ) {}
    var x = newGlobal();
    var y = Debugger(x);
    y.onNewScript = function (a) {
      a.setBreakpoint(0, a);
    };
    x.eval("");
    for (var j = Uint8Array; 1; ) {
      return y;
    }
  },
  saveStack(),
  "a",
).clearAllBreakpoints();
'''

'''
(gdb) bt
#0  0x00005555575f8343 in MOZ_CrashSequence (aAddress=0x0, aLine=116)
    at /home/msf2/shell-cache/js-dbg-64-linux-x86_64-974b0546f470-602806/objdir-js/dist/include/mozilla/Assertions.h:237
#1  js::DebugScript::getUnbarriered (script=0x3c43f41ab060) at /home/msf2/trees/firefox/js/src/debugger/DebugScript.cpp:116
#2  0x00005555575f8c9f in js::DebugScript::destroyBreakpointSite (gcx=0x7ffff5e2e9e8, script=0x0, pc=0x7ffff7804563 <_IO_2_1_stderr_+131> "")
    at /home/msf2/trees/firefox/js/src/debugger/DebugScript.cpp:229
#3  0x0000555557621675 in js::BreakpointSite::destroyIfEmpty (this=0x7ffff5e24730, gcx=0x7ffff5e2e9e8)
    at /home/msf2/trees/firefox/js/src/debugger/Debugger.h:1505
#4  js::Breakpoint::remove (this=<optimized out>, gcx=0x7ffff5e2e9e8) at /home/msf2/trees/firefox/js/src/debugger/Debugger.cpp:478
#5  js::Debugger::CallData::clearAllBreakpoints (this=this@entry=0x7fffffffc8f0) at /home/msf2/trees/firefox/js/src/debugger/Debugger.cpp:4889
/snip
'''

This seems to go as far back as gh rev: https://github.com/mozilla-firefox/firefox/commit/564a36e5a3ae

Run with `--fuzzing-safe --no-threads --no-baseline --no-ion --more-compartments`, compile with `AR=ar sh ~/trees/firefox/js/src/configure --enable-debug --enable-debug-symbols --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests`, tested on gh rev 974b0546f470bf87a34d636a03607d788ba9305f.

Setting needinfo? from :arai as a start. :arai, any thoughts?

The original report as published on Mozilla's Bugzilla, by Gary Kwong. 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.

What is known

A medium-severity memory corruption bug in JavaScript Engine. Mozilla made it public on 13 January 2026 as CVE-2026-4701.

About Memory corruption

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Gary Kwong

View all

42 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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.