Skip to content
Memory corruption Advisory Advanced CVE-2021-38008

Google Chrome MediaStreamTrackGenerator use after free vulnerability

A use-after-free vulnerability exists in Google Chrome's MediaStreamTrackGenerator. A specially crafted web page can trigger the flaw, potentially leading to arbitrary code execution.

Marcin Towalski Follow

Originally disclosed on Cisco Talos

High 8.3 View original

A potential code execution vulnerability exists in the MediaStreamTrackGenerator functionality of Google Chrome 94.0.4606.81 (Stable) and 97.0.4674.1 (Canary). A specially-crafted web page can lead to use-after-free.

Marcin Towalski, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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 cloned MediaStreamTrackGenerator object is not properly tracked by the garbage collector, so aborting the stream frees it while a reference remains.

Impact

With proper manipulation of objects, this vulnerability could lead to control over freed memory and ultimately arbitrary code execution.

What the attacker needed

Victim visits a malicious web page

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.

A use-after-free bug happens when a program frees memory but keeps using it, like deleting a file but still reading it. Here, a cloned media stream object is freed while still referenced, so an attacker could control that memory and run their own 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 Marcin Towalski

View all

12 more disclosed reports, best first.

More from Cisco Talos

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.