Skip to content
Memory corruption Advisory Advanced CVE-2026-79027

Use after free in WebRTC (CVE-2026-79027)

A malicious WebRTC peer can send padding packets with sequence numbers spread across more than half of the 16-bit sequence space, which breaks the ordering assumption of a comparator used in libwebrtc's video packet buffer. When a frame later completes across the sequence-number wrap, the corrupted tree causes an inverted iterator range to be passed to erase, leading to a use-after-free and heap corruption in the Firefox content process.

Mozilla Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 36 days

VULNERABILITY DETAILS Note, this is being reported by Mozilla, the issue is in libwebrtc but was exposed through Firefox via Ai scanning tools. https://bugzilla.mozilla.org/show_bug.cgi?id=2053579 Happy to cc someone from Google into this Mozilla bug report. There is more detail in the report available.

libwebrtc's video PacketBuffer tracks received padding packets in received_padding_, a std::set<uint16_t, DescendingSeqNumComp<uint16_t>>. The comparator is only a valid strict weak ordering while all stored sequence numbers span at most half of the 16-bit sequence space (an explicitly documented precondition in sequence_number_util.h). A malicious remote WebRTC peer fully controls the media-stream sequence numbers of padding packets: RTX packets whose payload is just the 2-byte original sequence number (OSN) are de-encapsulated by RtxReceiveStream::OnRtpPacket into empty media packets, which RtpVideoStreamReceiver2 routes to PacketBuffer::InsertPadding. InsertPadding inserts the attacker-chosen value into received_padding_ without any range pruning, so the attacker can populate the set with values (e.g. 5, 32771, 46685, 32762) spanning more than half the sequence space, breaking the comparator's transitivity and producing an inconsistently ordered rb-tree.

When a frame is subsequently completed across the 16-bit wrap (packets 65530..2), PacketBuffer::FindFrames executes received_padding_.erase(received_padding_.lower_bound(start), received_padding_.upper_bound(seq_num)). On the corrupted tree, lower_bound returns end() while upper_bound returns a live node, so std::set::erase is invoked with an inverted iterator range. libstdc++'s _M_erase_aux then walks from end(), passing the rb-tree header node — which is embedded inside the live VideoReceiveStream2 allocation — to free() (ASAN 'attempting free on address which was not malloc()-ed', 3648 bytes inside the 5232-byte VideoReceiveStream2 region) and frees tree nodes that remain linked into the structure, yielding use-after-free/heap corruption in the content process.

The bug is reachable by any web page that establishes an RTCPeerConnection with a malicious remote peer (recvonly video with RTX negotiated — the WebRTC default; no camera/microphone permission or other user interaction is required). It was reproduced on an unmodified mozilla-central ASAN build.

VERSION Chrome Version: n/a Operating System: Reproduced on Linux

REPRODUCTION CASE Test cases available.

CREDIT INFORMATION Reporter credit: Mozilla

The original report as published on the Chromium issue tracker, by Mozilla. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 the padding-packet set uses a comparator that is only valid while all stored sequence numbers span at most half of the 16-bit space, and InsertPadding never prunes or validates attacker-chosen values against that precondition.

Impact

A malicious remote peer could trigger a use-after-free and heap corruption in the Firefox content process from any web page, without camera or microphone permission or other user interaction.

What the attacker needed

Victim visits a page that opens a peer connection; attacker controls the remote WebRTC peer; no camera or microphone permission needed

How it was found

  1. Establish an RTCPeerConnection from a web page to a malicious remote peer with recvonly video and RTX negotiated.
  2. From the malicious peer, send RTX padding packets whose original sequence numbers span more than half of the 16-bit space.
  3. Complete a frame across the 16-bit wrap so that FindFrames runs the erase with lower_bound and upper_bound.
  4. Observe the inverted iterator range passed to std::set::erase and the resulting free of the rb-tree header node inside the VideoReceiveStream2 allocation.

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.

WebRTC lets browsers send video and audio directly to each other, and each packet carries a number so the receiver can put them in order. The receiving code assumed those numbers would always stay within a certain range, but a hostile peer can choose numbers outside that range and confuse the sorting structure. The result is that the browser frees memory it is still using, which can crash it or potentially let an attacker run code.

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 Mozilla

View all

3 more disclosed reports, best first.

More from Google Chrome

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.