Insufficient validation of untrusted input in Media (CVE-2026-13920)
A compromised renderer can forge the size metadata of an ExportedSharedImage, which the GPU process trusts without validating against the actual DXGI resource. This allows an out-of-bounds read of adjacent GPU memory, which is encoded and leaked back to the renderer.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 52 days
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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A compromised renderer can forge the size metadata of an ExportedSharedImage, which is trusted by the GPU process without validation against the underlying DXGI handle. This allows an attacker to pass an out-of-bounds source rectangle to D3D11 operations in the MediaFoundationVideoEncodeAccelerator. This can potentially result in an out-of-bounds read of adjacent GPU memory, which is encoded and leaked back to the renderer.
Affected files:
media/gpu/windows/media_foundation_video_encode_accelerator_win.ccmedia/mojo/services/mojo_video_encode_accelerator_service.ccgpu/command_buffer/client/client_shared_image.ccgpu/command_buffer/client/internal/mappable_buffer_dxgi.ccmedia/base/video_frame.ccmedia/mojo/mojom/video_frame_mojom_traits.cc
Estimated timestamp from git blame: 2025-09-04
Description
A potential vulnerability exists in the Media Foundation Video Encode Accelerator (MFVEA) on Windows where a compromised renderer can cause an out-of-bounds (OOB) read of GPU memory. The issue occurs because the GPU process trusts the metadata.size of an ExportedSharedImage over IPC without verifying it against the actual dimensions of the underlying DXGI resource.
This unvalidated size bypasses encoder validation checks, allowing an oversized visible_rect to be used when building source regions for D3D11 scaling and copy operations. Because the D3D11 driver is instructed to read beyond the bounds of the actual allocation, it may access adjacent GPU memory.
Potential Attacker Steps
Although an end-to-end proof of concept has not been executed, tracing the code suggests the following sequence of events could trigger the vulnerability:
- Resource Creation: A compromised renderer process creates a small, valid DXGI-backed
SharedImage(e.g., 64x64 pixels) and obtains its underlying OS handle (gfx::GpuMemoryBufferHandle). - Metadata Forgery: The renderer constructs a malicious
media::mojom::VideoFrameto send to the GPU process. In theExportedSharedImagepayload, it includes the valid OS handle but forgesmetadata.size,coded_size, andvisible_rectto a much larger dimension (e.g., 8192x8192). - Missing Validation on Import: The GPU process deserializes the frame. In
gpu/command_buffer/client/internal/mappable_buffer_dxgi.cc,CreateFromHandlewraps the DXGI handle without querying the OS to ensure the texture is actually as large as the providedsize. - Encoder Check Bypass: The
VideoFrameadopts the forged dimensions. When it reachesMojoVideoEncodeAcceleratorService::Encode, it bypasses theinput_coded_size_mismatch check becauseframe->HasMappableSharedImage()evaluates to true. - OOB D3D11 Operation: The frame reaches
MediaFoundationVideoEncodeAccelerator.- In
PerformD3DScaling, the code correctly queries the actual texture dimensions viainput_texture->GetDesc(). However, it ignores these dimensions, blindly constructing aRECT source_rectusing the attacker-controlledvisible_rect. - This oversized
source_rectis passed toVideoProcessorSetStreamSourceRectand executed viaVideoProcessorBlt. - (Alternatively, the same flaw exists in
PerformD3DCopywhere an oversizedD3D11_BOX src_boxis passed toCopySubresourceRegion).
- In
- Information Leak: The D3D11 driver executes the OOB read. The leaked GPU memory is processed, encoded into a video bitstream by the Media Foundation hardware encoder, and the compressed payload is returned to the compromised renderer.
Impact
This vulnerability potentially allows a compromised renderer process to read arbitrary GPU memory from other origins or desktop applications, resulting in a cross-origin information leak (Sandbox Escape). Providing invalid, out-of-bounds regions to D3D11 drivers might also result in memory corruption within the unsandboxed GPU process or cause the user-mode driver to crash.
Recommended Fix
- MFVEA Clamping: In
media/gpu/windows/media_foundation_video_encode_accelerator_win.cc, updatePerformD3DScalingandPerformD3DCopyto clamp thevisible_rectto the actual dimensions of the texture (obtained viaGetDesc()) before constructingsource_rectandsrc_box. - Import Validation: Consider adding validation to
MappableBufferDXGI::CreateFromHandle(similar toMappableBufferIOSurface) to query the underlying DXGI resource and reject the import if the requested size exceeds the actual resource bounds.
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
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
The GPU process trusts the size metadata of an ExportedSharedImage without verifying it against the actual dimensions of the underlying DXGI resource.
Impact
This could allow a compromised renderer to read arbitrary GPU memory from other origins or desktop applications, resulting in a cross-origin information leak and potential sandbox escape; it might also cause memory corruption or a driver crash.
What the attacker needed
Compromised renderer process; Windows with D3D11 and Media Foundation
The fix
The fix should clamp the visible_rect to the actual texture dimensions in PerformD3DScaling and PerformD3DCopy, and add validation in MappableBufferDXGI::CreateFromHandle to reject imports where the requested size exceeds the actual resource bounds.
How it was found
- A compromised renderer creates a small, valid DXGI-backed SharedImage and obtains its OS handle.
- The renderer constructs a malicious VideoFrame with the valid handle but forged larger size metadata.
- The GPU process deserializes the frame without querying the OS to verify the actual texture size.
- The forged dimensions bypass the encoder's size mismatch check.
- The encoder uses the attacker-controlled visible_rect to build an oversized source rectangle for D3D11 operations.
- The D3D11 driver performs an out-of-bounds read, and the leaked GPU memory is encoded and returned to the renderer.
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 is the part of the browser that displays web pages and is normally kept in a sandbox. Here, a compromised renderer can lie about the size of a shared image, and the GPU process (which handles graphics) believes it. This lets the renderer read memory it should not see, potentially leaking data from other applications.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.