Insufficient validation of untrusted input in Media (CVE-2026-11046)
A missing validation check in the MojoDecryptorService allows a compromised renderer to send a VideoDecoderConfig with extremely large video dimensions to the CDM process. This could cause an integer overflow during frame buffer allocation, leading to a heap buffer overflow and potential code execution within the sandboxed CDM utility process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: A compromised renderer can send a VideoDecoderConfig with maliciously large video dimensions directly to the CDM process via MojoDecryptorService. Because size validation is missing in the receiving service, these unbounded dimensions are passed directly into the closed-source CDM library. This likely leads to integer overflows during frame buffer allocation, potentially resulting in a heap buffer overflow and code execution within the sandboxed CDM utility process.
Affected files:
media/mojo/services/mojo_decryptor_service.ccmedia/mojo/mojom/video_decoder_config_mojom_traits.ccmedia/cdm/cdm_adapter.cc
Estimated timestamp from git blame: 2025-12-09
Summary
There is a potential missing validation check in MojoDecryptorService::InitializeVideoDecoder that could allow a compromised renderer to trigger memory corruption within the sandboxed Content Decryption Module (CDM) utility process.
The Mojo deserialization traits for media::mojom::VideoDecoderConfig deliberately do not call IsValidConfig() to enforce dimension limits, delegating this responsibility to the receiving services. While MojoVideoDecoderService correctly enforces this check, MojoDecryptorService does not, allowing arbitrarily large video dimensions to be passed directly into third-party, closed-source CDM libraries (like Widevine).
Technical Details
- Deserialization bypasses limits: When a
VideoDecoderConfigis sent over IPC,StructTraits<...>::Readinmedia/mojo/mojom/video_decoder_config_mojom_traits.ccreconstructs the object. The traits forgfx::Sizeonly verify thatwidthandheightare non-negative. Crucially, the traits do not callconfig.IsValidConfig(), allowing the creation of a config with dimensions that far exceedmedia::limits::kMaxDimension(32767). - Missing Service Validation: In
media/mojo/services/mojo_decryptor_service.cc,InitializeVideoDecoderreceives this config and forwards it immediately to the underlyingdecryptor_(typically aCdmAdapter). It fails to validate the config or invokemojo::ReportBadMessage. - ABI Translation: In
CdmAdapter::InitializeVideoDecoder(media/cdm/cdm_adapter.cc), the unvalidatedVideoDecoderConfigis translated into acdm::VideoDecoderConfig_3struct. The maliciouscoded_sizevalues are blindly copied into the ABI struct. - Library Execution: The
CdmAdapterpasses the struct into the closed-source CDM library. Video decoders typically calculate frame buffer allocations by multiplying width and height (e.g.,width * height * 1.5for YUV). Passing maximum 32-bit integer values guarantees an integer overflow, leading to an undersized heap allocation and a subsequent heap buffer overflow when the library attempts to write video data.
Potential Attack Steps
Note: These are potential steps based on code analysis; our tooling agent does not yet have the ability to run code to provide a verified proof-of-concept.
- An attacker compromises a sandboxed Renderer process (e.g., via a V8 bug).
- The attacker uses
media::mojom::InterfaceFactory::CreateCdmto request a CDM, which launches the CDM utility process and returns aCdmContextcontaining a directpending_remote<media::mojom::Decryptor>pipe. - The attacker crafts a malicious
VideoDecoderConfigcontaining a valid codec but extremely largecoded_sizedimensions (e.g.,width = 65536, height = 65536orINT_MAX). - The attacker calls
InitializeVideoDecoderon theDecryptorremote, sending the malicious config. - The CDM utility process receives the unvalidated dimensions, triggering an integer overflow and heap buffer overflow inside the third-party CDM library, leading to arbitrary code execution within the CDM process.
Suggested Fix
Add explicit validation to MojoDecryptorService::InitializeVideoDecoder to reject invalid configurations and terminate the Mojo connection if one is detected.
void MojoDecryptorService::InitializeVideoDecoder(
const VideoDecoderConfig& config,
InitializeVideoDecoderCallback callback) {
DVLOG(2) << __func__;
if (!config.IsValidConfig()) {
mojo::ReportBadMessage("Invalid VideoDecoderConfig");
return;
}
decryptor_->InitializeVideoDecoder(
config, base::BindOnce(&MojoDecryptorService::OnVideoDecoderInitialized,
weak_this_, std::move(callback)));
}
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 MojoDecryptorService fails to validate the VideoDecoderConfig dimensions before passing them to the CDM library, unlike the MojoVideoDecoderService which does validate.
Impact
A compromised renderer could potentially execute arbitrary code within the sandboxed CDM utility process, though the attack requires a separate renderer compromise and the CDM process is sandboxed.
What the attacker needed
Compromised renderer process; CDM process available
The fix
The fix is to add explicit validation in MojoDecryptorService::InitializeVideoDecoder to reject invalid configurations and terminate the Mojo connection.
How it was found
- An attacker compromises a sandboxed Renderer process.
- The attacker uses InterfaceFactory::CreateCdm to request a CDM, obtaining a Decryptor remote.
- The attacker crafts a VideoDecoderConfig with extremely large coded_size dimensions.
- The attacker calls InitializeVideoDecoder on the Decryptor remote with the malicious config.
- The CDM utility process receives the unvalidated dimensions, triggering an integer overflow and heap buffer overflow.
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 renderer process (which displays web content) can be compromised by an attacker. It can then send a message to another process (the CDM, which handles DRM video decryption) with video dimensions that are too large. The CDM process does not check these dimensions, so it may try to allocate a buffer that is too small due to an integer overflow, and then write video data beyond that buffer, potentially allowing the attacker to run code in the CDM process.
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.