Skip to content

Fix GH-25964: WebP VP8 dimensions accepted with an invalid start code - #25983

Open
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25964
Open

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25964

Conversation

@lazerg

@lazerg lazerg commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

A lossy VP8 key frame starts with the 9D 01 2A start code, but php_handle_webp() read the width and height from bytes 14-17 without checking it. Any VP8 chunk was accepted and arbitrary bytes were returned as dimensions. The start code is now checked, and getimagesize() returns false when it does not match.

Fixes #25964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant