Skip to content

fix: report extreme image dimensions in attach_image - #267

Draft
hubert-marek wants to merge 1 commit into
mainfrom
fix/image-attachment-aspect-ratio
Draft

hubert-marek wants to merge 1 commit into
mainfrom
fix/image-attachment-aspect-ratio

Conversation

@hubert-marek

Copy link
Copy Markdown
Contributor

A very narrow crop can end a rollout when the vision processor rejects the next model request. Surface the file name, width and height in the IPython tool response so the agent can widen the crop or pad it and continue.

The Qwen vision processor rejects images when the longer side exceeds 200 times the shorter side. Accept equality. This applies the same portability limit to files shown via attach_image and its alias across models. Check all files before displaying the first one. Raw IPython display and MCP image blocks are outside this change.

Verified with RGB PNGs on a Qwen vision endpoint: 1×902, 8×1608 and 1608×8 returned HTTP 400. 8×1600, 32×32 and 1×1 returned HTTP 200. The kernel regression test exercises recovery in the same session and acceptance at the boundary. All four targeted attachment tests passed.

@wiz-prime-intellect

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 5 Critical 24 High 14 Medium
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 5 Critical 24 High 14 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Comment thread uv.lock

[[package]]
name = "pillow"
version = "12.3.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical Vulnerability Finding

More Details

Vulnerabilities [pillow:12.3.0]

Name Severity Source Fixed version CVSS score CVSS exploitability score Has public exploit Has CISA KEV exploit
CVE-2026-112390 High https://github.com/advisories/GHSA-22hg-r758-rrw9 13.0.0 8.2 3.9 true false
CVE-2026-112391 Medium https://github.com/advisories/GHSA-254f-3936-288h 13.0.0 6.3 3.9 true false
CVE-2026-112392 High https://github.com/advisories/GHSA-27h8-gf7j-v5hc 13.0.0 8.2 3.9 true false
CVE-2026-112393 Critical https://github.com/advisories/GHSA-332p-7hrc-92wf 13.0.0 9.2 3.9 true false
CVE-2026-112394 Medium https://github.com/advisories/GHSA-4558-3h8r-v8xp 13.0.0 6.3 3.9 true false
CVE-2026-112395 Medium https://github.com/advisories/GHSA-462x-pgg6-55fp 13.0.0 8.2 3.9 true false
CVE-2026-112396 Medium https://github.com/advisories/GHSA-4rr5-89j8-mwwm 13.0.0 7.5 3.9 true false
CVE-2026-112397 High https://github.com/advisories/GHSA-58r4-6rv3-gfh8 13.0.0 8.7 3.9 true false
CVE-2026-112398 Critical https://github.com/advisories/GHSA-5x8w-8jj5-q52h 13.0.0 9.2 3.9 true false
CVE-2026-112399 High https://github.com/advisories/GHSA-5xm2-6676-qcp9 13.0.0 8.7 3.9 true false
CVE-2026-112400 High https://github.com/advisories/GHSA-65qm-jvmh-6pqg 13.0.0 8.7 3.9 true false
CVE-2026-112401 Medium https://github.com/advisories/GHSA-74r2-7ff9-mjj2 13.0.0 6.9 3.9 true false
CVE-2026-112402 High https://github.com/advisories/GHSA-7mwm-ghpf-9vrm 13.0.0 8.7 3.9 true false
CVE-2026-112403 Critical https://github.com/advisories/GHSA-8g5g-8vmr-9782 13.0.0 9.2 3.9 true false
CVE-2026-112404 High https://github.com/advisories/GHSA-c6hw-5grf-ff96 13.0.0 8.8 3.9 true false
CVE-2026-112405 High https://github.com/advisories/GHSA-cp9v-662q-vvx9 13.0.0 8.7 3.9 true false
CVE-2026-112406 High https://github.com/advisories/GHSA-f2g6-542v-9j58 13.0.0 8.7 3.9 true false
CVE-2026-112891 Medium https://github.com/advisories/GHSA-fc9g-5qg7-mf45 13.0.0 6.9 3.9 false false
CVE-2026-112892 High https://github.com/advisories/GHSA-gg2r-wvfm-q9rx 13.0.0 8.7 3.9 false false
CVE-2026-112893 High https://github.com/advisories/GHSA-j4m9-6w36-pw47 13.0.0 8.2 3.9 true false
CVE-2026-112894 High https://github.com/advisories/GHSA-jg86-v3jv-hrpm 13.0.0 8.7 3.9 true false
CVE-2026-112895 High https://github.com/advisories/GHSA-p4wg-p73j-c528 13.0.0 8.7 3.9 true false
CVE-2026-112896 High https://github.com/advisories/GHSA-pchr-8j38-3x4p 13.0.0 8.8 1.8 true false
CVE-2026-112897 High https://github.com/advisories/GHSA-q45j-58j2-45rg 13.0.0 8.7 2.5 true false
CVE-2026-112898 Medium https://github.com/advisories/GHSA-rfgq-q3w2-pmv2 13.0.0 6.9 3.9 true false
CVE-2026-112899 Medium https://github.com/advisories/GHSA-vx6w-vv9f-6gvg 13.0.0 6.3 3.9 true false
CVE-2026-112900 Critical https://github.com/advisories/GHSA-w889-685w-c8fh 13.0.0 9.2 3.9 true false
CVE-2026-112901 Medium https://github.com/advisories/GHSA-xgh8-jp6q-p5x8 13.0.0 6.9 3.9 true false
CVE-2026-112902 High https://github.com/advisories/GHSA-xvh5-g6gv-559v 13.0.0 8.3 3.9 true false
CVE-2026-114501 Medium https://github.com/advisories/GHSA-654x-cwwv-5j9c 13.0.0 6.3 3.9 false false
CVE-2026-128066 Medium https://github.com/advisories/GHSA-wqgw-9xfh-qf2g 13.0.0 8.7 - false false
CVE-2026-128067 High https://github.com/advisories/GHSA-xcvg-w56q-r89m 13.0.0 8.4 - false false
CVE-2026-96636 Medium https://github.com/advisories/GHSA-p8hx-v2p6-rp84 13.0.0 6.5 2.8 false false
CVE-2026-96637 High https://github.com/advisories/GHSA-g842-9rc4-69pw 13.0.0 7.1 2.8 false false
CVE-2026-96638 Medium https://github.com/advisories/GHSA-24rc-8hj2-v98c 13.0.0 6.5 2.8 false false
CVE-2026-96639 Critical https://github.com/advisories/GHSA-v9pv-5gc8-w2m6 13.0.0 9.8 3.9 true false
CVE-2026-96640 High https://github.com/advisories/GHSA-mrfp-p49p-3hf2 13.0.0 8.2 3.9 false false
CVE-2026-96641 Medium https://github.com/advisories/GHSA-4rm8-3hmm-39fg 13.0.0 6.5 2.8 false false
CVE-2026-96642 High https://github.com/advisories/GHSA-3j72-p6qg-6xp7 13.0.0 7.1 2.8 false false
CVE-2026-96643 High https://github.com/advisories/GHSA-g4qv-2jxx-769h 13.0.0 7.1 2.8 false false
CVE-2026-96644 High https://github.com/advisories/GHSA-9v9v-9qvf-h2hj 13.0.0 7.1 2.8 false false
CVE-2026-96778 High https://github.com/advisories/GHSA-g7cr-3p24-7wf7 13.0.0 7.7 2.8 true false
GHSA-78g4-xqwv-q3g8 High https://github.com/advisories/GHSA-78g4-xqwv-q3g8 13.0.0 8.1 - false false

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

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.

1 participant