Insufficient validation of untrusted input in Compositing (CVE-2026-11235)
A privilege check in PaintOpReader only blocks SkSL shaders when the shader type is kSkSLCommand, but the deserialisation code still compiles SkSL for other shader types if the cache state is inlined. A compromised renderer can therefore send a crafted paint-op buffer that triggers the SkSL compiler in the GPU process, expanding the attack surface for memory corruption.
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.
Overview: A compromised renderer can bypass a privilege check in PaintOpReader to trigger SkSL compilation in the GPU process. By providing a non-kSkSLCommand shader type with an inlined cache state, an attacker can expose the SkSL compiler's attack surface.
Affected files:
cc/paint/paint_op_reader.cccc/paint/paint_shader.cccc/paint/paint_shader.h
Estimated timestamp from git blame: 2025-03-18
Description
cc/paint/paint_op_reader.cc implements a privilege check in PaintOpReader::Read(sk_sp<PaintShader>* shader) intended to restrict the use of SkSL-based shaders to privileged processes (e.g., the browser process). The check specifically targets PaintShader::Type::kSkSLCommand, which was added as part of attack surface reduction measures:
if (!options_.is_privileged &&
shader_type == PaintShader::Type::kSkSLCommand) {
valid_ = false;
return;
}
However, the subsequent deserialization logic for PaintShader fails to enforce that SkSL source code is only processed for kSkSLCommand shaders. If an attacker provides a different shader_type (such as kColor) and sets the entry_state to PaintCacheEntryState::kInlined, the reader proceeds to invoke the SkSL compiler:
case PaintCacheEntryState::kInlined: {
Read(&ref.sksl_command_);
if (!valid_) {
return;
}
sk_sp<SkRuntimeEffect> effect =
SkRuntimeEffect::MakeForShader(ref.sksl_command_).effect;
// ...
An attacker can craft a PaintOp buffer where shader_type is set to PaintShader::Type::kColor (enum value 1) and entry_state_int is set to 2 (kInlined). This configuration bypasses the privilege check because kColor != kSkSLCommand, yet it still triggers SkRuntimeEffect::MakeForShader with attacker-controlled SkSL input.
Because PaintShader::IsValid() for kColor returns true unconditionally (in cc/paint/paint_shader.cc), the resulting shader is accepted by the reader. While the compiled effect may not be used for actual rendering in this case, the attacker successfully triggers the SkSL compiler's frontend (lexer, parser, IR generator, and optimizer) in the GPU process.
This behavior violates the assumption documented in cc/paint/paint_op_writer.cc that "only browser UI is submitting the shader commands."
Potential Attacker Steps (Note: Fortify LLM agent hasn't executed code)
- Compromise a renderer process.
- Generate a
RasterCHROMIUMpaint-op buffer containing aPaintShaderwith:has_shader = trueshader_type = 1(kColor)entry_state_int = 2(kInlined)sk_runtime_effect_id_= any non-zero value.- Followed by an
SkStringcontaining arbitrary SkSL source code.
- Submit this buffer via the renderer's raster command buffer to the GPU process.
- The GPU process's
RasterDecoderImpl::DoRasterCHROMIUM(ingpu/command_buffer/service/raster_decoder.cc) will setis_privileged = falsefor the renderer channel. PaintOpReader::Readwill skip the privilege check becauseshader_type != kSkSLCommand.- The code enters the
kInlinedbranch and callsSkRuntimeEffect::MakeForShaderon the provided SkSL.
Impact
This vulnerability exposes the complex SkSL compiler frontend in the GPU process to unprivileged renderer-controlled input. This significantly expands the attack surface of the GPU process, undermining the isolation intended for SkSL. An attacker can leverage this bypass in conjunction with any existing or undiscovered memory corruption bugs in the Skia SkSL compiler to gain code execution in the GPU process, which is a key step in a sandbox escape.
Suggested Fix
Ensure that the kInlined and kCached branches in PaintOpReader::Read for PaintShader also validate that the shader_type is compatible with SkSL effects (i.e., it must be kSkSLCommand), similar to the validation performed in the kEmpty branch (lines 824-833).
case PaintCacheEntryState::kInlined: {
if (ref.shader_type() != PaintShader::Type::kSkSLCommand) {
valid_ = false;
return;
}
Read(&ref.sksl_command_);
// ...
Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8
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. Please feel free to reach out to me if you have concerns or feedback.
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 deserialisation logic for PaintShader only enforced the SkSL privilege check for the kSkSLCommand shader type, but the kInlined cache state branch still invoked the SkSL compiler for any shader type.
Impact
This bypass could allow an attacker to combine it with memory corruption bugs in the SkSL compiler to gain code execution in the GPU process, which is a key step in a sandbox escape.
What the attacker needed
Compromised renderer process
The fix
The kInlined and kCached branches should also validate that the shader type is kSkSLCommand before processing SkSL.
How it was found
- Compromise a renderer process.
- Generate a RasterCHROMIUM paint-op buffer containing a PaintShader with shader_type set to kColor and entry_state set to kInlined, followed by arbitrary SkSL source code.
- Submit this buffer via the renderer's raster command buffer to the GPU process.
- The GPU process sets is_privileged to false for the renderer channel.
- PaintOpReader::Read skips the privilege check because shader_type is not kSkSLCommand.
- The code enters the kInlined branch and calls SkRuntimeEffect::MakeForShader on the provided SkSL.
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 is the part of a browser that turns web content into what you see; it is supposed to be less trusted than the GPU process, which handles graphics. The code that reads graphics commands had a check to stop the renderer from sending a certain kind of shader (a small program for drawing) to the GPU process, but the check only looked at one label. By using a different label, an attacker who already controls the renderer could still make the GPU process compile their shader code, which is a step towards breaking out of the sandbox.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.