Skip to content

[stable-4.0] fix(thumbnails): bound declared image dimensions before decoding - #3490

Open
rhafer wants to merge 2 commits into
opencloud-eu:stable-4.0from
rhafer:backport/stable-4.0/pr-3457
Open

[stable-4.0] fix(thumbnails): bound declared image dimensions before decoding#3490
rhafer wants to merge 2 commits into
opencloud-eu:stable-4.0from
rhafer:backport/stable-4.0/pr-3457

Conversation

@rhafer

@rhafer rhafer commented Sep 8, 2026

Copy link
Copy Markdown
Member

backports #3457

The imaging build decodes the full pixel buffer from the header-declared
dimensions before the existing MaxInputWidth/MaxInputHeight guard runs, so a
tiny crafted file whose header declares huge dimensions forces a multi-GB
allocation and can OOM the worker. Read the header with DecodeConfig and reject
oversized sources before the decode allocates, in both the imaging and vips
builds, and thread the limit through the audio cover-art and geogebra decoders
that decode a second attacker-controlled image.

(cherry picked from commit 7f687ea)
@rhafer
rhafer requested review from micbar and v-scharf September 8, 2026 13:42
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants