Skip to content

x/image/webp: lack of maximum size checks can create invalid images on 32-bit platforms #78407

@neild

Description

@neild

On 32-bit platforms, decoding a WebP image with a canvas size that overflows an int32 returns a corrupt Image that will panic when accessed.

WebP VP8X headers may not specify a canvas size (width * height) more than 2^32-1 pixels:
https://www.rfc-editor.org/rfc/rfc9649.html#section-2.7-12

We should not return corrupt images, and we should reject canvases that overflow the defined limit.

Thanks to Tristan Madani for reporting this issue.

This has been designated a PUBLIC track vulnerability and CVE-2026-33813.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.Securityvulncheck or vulndbIssues for the x/vuln or x/vulndb repo

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions