Skip to content
Memory corruption Disclosed report Advanced

AddressSanitizer: SEGV on unknown address on mozilla::HTMLEditor::ReplaceStringWithNormalizedWhiteSpaceSequence

A crafted web page caused Firefox to crash with a segmentation fault in the HTML editor code when using document.execCommand and selection manipulation. An attacker could potentially crash the browser, but the report does not demonstrate code execution or other impact.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 3 days
  • Paid in 8 days
  • Disclosed after 3 days
Text
Created attachment 9500585
asan-segv.txt

After visiting the testcase, Firefox crashed with `SIGSEGV / SEGV_ACCERR` or `AddressSanitizer: SEGV on unknown address` on `mozilla::HTMLEditor::ReplaceStringWithNormalizedWhiteSpaceSequence` as attached .txt file

The testcase is using `document.execCommand("delete")`, `document.getSelection();`, and `appendChild` to cause crash.

On mozregression the crash is reproducible since Firefox 2025-06-27

I'm still reducing the testcase further and deep-dive mozregression to find the root cause, I'll attach the testcase soon.

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

Root cause

Likely a memory safety bug in the HTML editor's whitespace normalisation logic triggered by a combination of editing commands and DOM manipulation.

Impact

A crafted web page could crash the browser, but the report does not show that an attacker could execute code or otherwise compromise the user.

What the attacker needed

Victim visits a crafted web page; Firefox version since 2025-06-27

How it was found

  1. Visit the testcase page in Firefox.
  2. The page uses document.execCommand("delete"), document.getSelection(), and appendChild.
  3. Firefox crashes with a segmentation fault in the HTML editor code.

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 describes a browser crash. A web page used built-in editing commands and selection changes to make Firefox's internal HTML editor access an invalid memory address, which caused the browser to stop working. The reporter has not yet shown that an attacker could do more than crash the browser.

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 Irvan Kurniawan

View all

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