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

Uninitialized Use in WebGL (CVE-2026-17808)

A logic flaw in the GLES2 command decoder causes the draw framebuffer to be rebound after draw buffers are prepared for clearing, so a clear can silently do nothing while the attachment is still marked as initialised. An attacker could then read back uninitialised GPU memory, potentially exposing graphics data from other origins.

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

Overview: A potential logic vulnerability exists in the GLES2 validating command decoder where the active draw framebuffer is rebound after preparing draw buffers for clearing. This discrepancy can allow a WebGL context to bypass lazy initialization of color attachments and read back uninitialized GPU memory contents.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder.cc
  • gpu/command_buffer/service/framebuffer_manager.cc

Estimated timestamp from git blame: 2016-07-15

Description

In gpu/command_buffer/service/gles2_cmd_decoder.cc, the function GLES2DecoderImpl::ClearUnclearedAttachments handles the lazy clearing of framebuffers containing uninitialized attachments. When a framebuffer (fboA) is bound as GL_READ_FRAMEBUFFER and a different framebuffer (fboB) is bound as GL_DRAW_FRAMEBUFFER, the decoder must temporarily rebind fboA to the GL_DRAW_FRAMEBUFFER target to execute the glClear operation.

However, this rebinding is performed after the call to PrepareDrawBuffersForClearingUninitializedAttachments(). Consequently, the underlying driver-level call to glDrawBuffersARB is executed while fboB is still bound to the driver's GL_DRAW_FRAMEBUFFER target, instead of fboA. This results in two issues:

  1. The draw buffer state of fboB is incorrectly modified/corrupted.
  2. When fboA is subsequently bound and glClear is executed, its active draw buffer state is still the client-defined state (which may be set to GL_NONE by the attacker). As a result, the glClear call executes as a silent no-op.

Despite the clear operation failing to overwrite the uninitialized backing memory of the attachment, the decoder unconditionally marks the attachments of fboA as initialized via MarkAttachmentsAsCleared(). A subsequent read operation (such as glReadPixels) will then return uninitialized GPU memory contents back to the client.

Potential Trigger Path (Theoretical Analysis)

Note: Our tooling does not currently have the capability to run code, and the following steps represent a potential attack vector based on static code analysis.

  1. A WebGL2 page creates a renderbuffer (rb) with an uninitialized backing store (e.g., using gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256)).
  2. The page attaches rb to a framebuffer fboA at GL_COLOR_ATTACHMENT0.
  3. The page configures fboA to disable drawing to the color attachment by calling gl.drawBuffers([gl.NONE]).
  4. The page binds a separate framebuffer fboB to GL_DRAW_FRAMEBUFFER, and binds fboA to GL_READ_FRAMEBUFFER.
  5. The page triggers a read operation (e.g., gl.readPixels) from fboA, forcing a lazy clear check.
  6. During ClearUnclearedAttachments, the driver-side GL_DRAW_FRAMEBUFFER is not rebound to fboA early because the renderbuffer format is not an integer format.
  7. PrepareDrawBuffersForClearingUninitializedAttachments runs, invoking glDrawBuffersARB which applies to the active draw FBO (fboB).
  8. fboA is bound to GL_DRAW_FRAMEBUFFER, and glClear is executed. Because its driver-side draw buffer is still GL_NONE, no clear occurs on rb.
  9. rb is marked as cleared, and the uninitialized contents of rb are read and returned to the attacker's buffer.

Impact

An attacker in a sandboxed WebGL context could exploit this vulnerability to read uninitialized GPU memory contents. In a shared GPU process environment, this could allow disclosure of sensitive cross-origin graphics data (such as canvas contents, textures, or video frames from other processes/tabs).

Suggested Remediation

To resolve this issue, the driver-side rebinding of the draw framebuffer should occur before evaluating or preparing the draw buffers for clearing.

Specifically, in GLES2DecoderImpl::ClearUnclearedAttachments, the rebinding logic should be consolidated and moved to the beginning of the function if target == GL_READ_FRAMEBUFFER and draw_framebuffer != framebuffer:

C++
// Suggested Fix in gpu/command_buffer/service/gles2_cmd_decoder.cc
void GLES2DecoderImpl::ClearUnclearedAttachments(
    GLenum target, Framebuffer* framebuffer) {
  ...
  Framebuffer* draw_framebuffer = GetBoundDrawFramebuffer();
  bool rebound_draw_framebuffer = false;
  if (target == GL_READ_FRAMEBUFFER && draw_framebuffer != framebuffer) {
    BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer->service_id());
    rebound_draw_framebuffer = true;
  }
  ...

This ensures that any subsequent draw buffer configuration or clear operation is executed against the correct target framebuffer.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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 draw framebuffer is rebound after preparing draw buffers for clearing, so the clear targets the wrong framebuffer and becomes a no-op while the attachment is still marked as cleared.

Impact

An attacker in a sandboxed WebGL context could read uninitialised GPU memory, potentially disclosing sensitive cross-origin graphics data such as canvas contents, textures, or video frames from other processes or tabs.

What the attacker needed

WebGL2 support in the browser; ability to run JavaScript in a page

The fix

The driver-side rebinding of the draw framebuffer should be moved before preparing draw buffers for clearing.

How it was found

  1. Create a renderbuffer with uninitialised storage and attach it to a framebuffer.
  2. Set the framebuffer's draw buffers to none.
  3. Bind a different framebuffer as the draw target and the first as the read target.
  4. Trigger a read from the first framebuffer to force a lazy clear check.
  5. The clear is skipped because the draw buffer state is still none, but the attachment is marked as cleared.
  6. Read pixels from the first framebuffer to obtain uninitialised memory.

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.

WebGL lets web pages draw and read pixels using the graphics card. Normally, new graphics memory is cleared before a page can read it, so one page cannot see another page's leftover data. Here, a mistake in the order of operations means the clear can be skipped, yet the system still believes the memory is clean, so a page could read whatever was left there.

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.