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

Side-channel information leakage in WebCodecs (CVE-2026-17978)

The WebCodecs VideoFrame.timestamp property returns raw microsecond-resolution timestamps without applying Chromium's TimeClamper coarsening. An attacker could use this fine-grained timing to bypass high-resolution timer mitigations and mount side-channel attacks.

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: The WebCodecs VideoFrame.timestamp property potentially exposes unclamped, microsecond-resolution timestamps to unprivileged web content. When video frames are captured from elements like canvas or camera streams, their raw timestamps are stored and returned without routing through TimeClamper or ClampTimeResolution. This allows a potential bypass of high-resolution timer coarsening mitigations, which are designed to prevent side-channel timing attacks.

Affected files:

  • third_party/blink/renderer/modules/webcodecs/video_frame_handle.cc
  • third_party/blink/renderer/modules/webcodecs/video_frame.cc

Estimated timestamp from git blame: 2024-04-16

Summary

A potential high-resolution timer mitigation bypass exists in WebCodecs where VideoFrame.timestamp exposes unclamped microsecond-precision timestamps. Chromium coarsens timestamps using TimeClamper to mitigate Spectre-style side-channel timing attacks, but the VideoFrame.timestamp path potentially bypasses this defense.

Root Cause Analysis

In third_party/blink/renderer/modules/webcodecs/video_frame_handle.cc, GetPreferredTimestamp computes the timestamp for a VideoFrameHandle:

C++
base::TimeDelta GetPreferredTimestamp(bool prefer_capture_timestamp,
                                      const media::VideoFrame& video_frame) {
  if (prefer_capture_timestamp) {
    if (video_frame.metadata().capture_begin_time) {
      return *video_frame.metadata().capture_begin_time - base::TimeTicks();
    }
    if (video_frame.metadata().reference_time) {
      return *video_frame.metadata().reference_time - base::TimeTicks();
    }
  }
  return video_frame.timestamp();
}

This is returned as a raw base::TimeDelta. Subsequently, VideoFrame::timestamp() in third_party/blink/renderer/modules/webcodecs/video_frame.cc exposes this value directly to JavaScript in microseconds:

C++
int64_t VideoFrame::timestamp() const {
  return handle_->timestamp().InMicroseconds();
}

There is no routing of this timestamp through Performance::ClampTimeResolution or TimeClamper. As a result, the time resolution is exposed at a 1-microsecond granularity.

Potential Reproduction / Trigger Steps

Note: Since our automated tooling agent does not have the ability to run code, these are potential/suggested reproduction steps based on static code analysis.

  1. Capture a stream from a <canvas> element using const stream = canvas.captureStream();
  2. Process the stream track using const processor = new MediaStreamTrackProcessor({track: stream.getVideoTracks()[0]});
  3. Periodically perform draw operations on the canvas and trigger paint invalidations;
  4. Read frames from the MediaStreamTrackProcessor readable stream reader;
  5. Query frame.timestamp in JavaScript. The returned values will potentially have a 1µs resolution rather than the clamped 5µs or 100µs resolution.

Sibling Protections

Similar interfaces that handle frame metadata (e.g., requestVideoFrameCallback in video_frame_callback_requester_impl.cc) explicitly coarsen their timestamps via Performance::ClampTimeResolution to uphold the security boundary.

Suggested Fix

Coarsen/clamp the timestamp resolution returned to JavaScript. This can be achieved by routing the microsecond delta through the document's or execution context's Performance::ClampTimeResolution before converting/exposing it in VideoFrame::timestamp() or during VideoFrameHandle construction.

Evaluated with Chrome root at commit: 87214e6721f6c34afd9181b80769a24c0c601c50


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 WebCodecs timestamp path returns the raw frame timestamp without routing it through Performance::ClampTimeResolution or TimeClamper.

Impact

The report claims this could bypass high-resolution timer coarsening and enable Spectre-style side-channel timing attacks; it is a static-analysis finding and no working exploit is shown.

What the attacker needed

Victim visits a malicious page; browser supports WebCodecs and canvas capture

The fix

The timestamp should be coarsened by routing it through Performance::ClampTimeResolution before it is exposed to JavaScript.

How it was found

  1. Capture a stream from a canvas element.
  2. Wrap the video track in a MediaStreamTrackProcessor.
  3. Draw on the canvas periodically to trigger new frames.
  4. Read frames from the processor's readable stream.
  5. Read frame.timestamp and observe the fine resolution.

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.

Browsers deliberately make precise timers less precise, because very exact timing can let a malicious page infer secret information through side channels. This report says one WebCodecs property hands back a very exact timestamp that skips that blurring step. The report is based on reading the code, not on running an exploit.

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.