Skip to content
Info disclosure Advisory Advanced CVE-2026-17706

Insufficient validation of untrusted input in Media (CVE-2026-17706)

The Windows media encoder did not check that a renderer-supplied visible_rect was aligned to the 2x2 grid required for NV12 frames, so the D3D11 copy silently failed and left the destination texture uninitialised. A compromised renderer could then receive encoded video containing stale GPU memory, potentially leaking cross-origin VRAM.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 57 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: In MediaFoundationVideoEncodeAccelerator on Windows, a compromised renderer can supply an unaligned visible_rect for NV12 video frames. This results in an invalid source box for D3D11 CopySubresourceRegion, causing the copy operation to silently fail. Consequently, the uninitialized destination texture is encoded and returned to the renderer, potentially leaking cross-origin GPU VRAM.

Affected files:

  • media/gpu/windows/media_foundation_video_encode_accelerator_win.cc

Estimated timestamp from git blame: 2024-06-25

Root Cause Analysis

In MediaFoundationVideoEncodeAccelerator on Windows, when the frame size matches the configured size, the accelerator attempts to copy the frame's texture to avoid concurrent usage glitches. This is performed via PerformD3DCopy inside media/gpu/windows/media_foundation_video_encode_accelerator_win.cc:

  1. Uninitialized Texture Allocation (InitializeD3DCopying): The destination texture copied_d3d11_texture_ is allocated with nullptr as the pInitialData argument, which leaves its contents uninitialized (stale GPU memory):

    C++
    // media/gpu/windows/media_foundation_video_encode_accelerator_win.cc
    HRESULT hr = texture_device->CreateTexture2D(&copy_desc, nullptr,
                                                 &copied_d3d11_texture);
    
  2. Unaligned Box Construction and Copy (PerformD3DCopy): The code checks that visible_rect is within the bounds of the input texture's dimensions. However, it does not check that the coordinates are 2x2 aligned for chroma subsampling. It then constructs a D3D11_BOX directly using these coordinates:

    C++
    D3D11_BOX src_box = {static_cast<UINT>(visible_rect.x()),
                         static_cast<UINT>(visible_rect.y()),
                         0,
                         static_cast<UINT>(visible_rect.right()),
                         static_cast<UINT>(visible_rect.bottom()),
                         1};
    device_context->CopySubresourceRegion(copied_d3d11_texture_.Get(), 0, 0, 0,
                                          0, input_texture, 0, &src_box);
    
  3. Silent Failure and Information Leak: For DXGI_FORMAT_NV12 textures, the D3D11 runtime requires the box dimensions and offsets to align to the format's 2x2 subsampling grid. If the renderer provides odd-aligned coordinates (e.g., x = 1, y = 1), the CopySubresourceRegion call is rejected by the D3D11 runtime (D3D11_MESSAGE_ID_COPYSUBRESOURCEREGION_INVALIDSOURCEBOX) and silently no-ops.

    Since there is no return-value check or fallback handling, the uninitialized copied_d3d11_texture_ is wrapped into an IMFSample and passed to the MFT hardware encoder via ProcessInput. The encoder compresses this uninitialized GPU memory and returns the bitstream containing stale GPU graphics data back to the renderer.

Suggested Attack Steps

Note: The following are potential steps as these findings are based on static analysis and have not been validated with a dynamic proof-of-concept.

  1. From a compromised renderer, initialize a VideoEncodeAccelerator with format PIXEL_FORMAT_NV12 and a standard target resolution (e.g., 1920x1080).
  2. Allocate a slightly larger multi-planar NV12 SharedImage (e.g., 1922x1082) backed by a DXGI shared resource handle.
  3. Request an encode with a visible_rect containing odd coordinates (e.g., gfx::Rect(1, 1, 1920, 1080)).
  4. The Mojo deserializer verifies that visible_rect is contained within the coded_size of 1922x1082 but does not enforce any alignment requirements, letting the request proceed.
  5. PerformD3DCopy builds the unaligned D3D11_BOX and executes the copy, which silently fails on NV12. The stale VRAM is then encoded and returned to the renderer via BitstreamBufferReady.

Suggested Fix

To remediate this issue, validate that the coordinates of visible_rect are properly aligned to the subsampling requirements of the video format before performing the copy.

For PIXEL_FORMAT_NV12, enforce that visible_rect.x(), visible_rect.y(), visible_rect.width(), and visible_rect.height() are aligned on even boundaries, or return E_INVALIDARG if they are not. Alternatively, zero-initialize the texture on allocation or clear it when a copy fails to avoid leaking stale memory.

Evaluated with Chrome root at commit: 9ebf4302210513a012c901d87a2668b3aadf8cc1


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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.

The original report as published on the Chromium issue tracker. 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 code validated that visible_rect was inside the texture bounds but never enforced the 2x2 chroma alignment NV12 requires, and it ignored the failure of the copy into a texture allocated without initial data.

Impact

A compromised renderer could potentially leak stale GPU memory from other origins through the encoded bitstream; the report notes the findings come from static analysis and were not validated with a proof-of-concept.

What the attacker needed

Compromised renderer process; Windows with D3D11 hardware encoding

The fix

The visible_rect coordinates should be validated against the format's subsampling alignment and rejected with an invalid-argument error, or the texture should be zero-initialised or cleared when a copy fails.

How it was found

  1. Initialise the video encode accelerator with NV12 format and a standard resolution.
  2. Allocate a slightly larger NV12 shared image backed by a shared GPU resource.
  3. Request an encode whose visible_rect uses odd coordinates.
  4. The request passes validation because only containment is checked, not alignment.
  5. The copy fails silently and the stale texture is encoded and returned.

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 graphics card texture is a block of memory holding an image. The browser copies a video frame into a second texture before encoding it, but that second texture was never cleared, so it still holds whatever was there before. Because a size check was missing, the copy quietly did nothing and the encoder sent the leftover memory back to the web page.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.