CVE-2026-70378: CWE-1284 Improper Validation of Specified Quantity in Input in theotherphil imagecli
imagecli's `carve <ratio>` pipeline operation (Carve::apply() in src/image_ops.rs) only asserts `ratio <= 1.0`, never validating that the ratio is positive. A negative ratio (e.g. -5) causes the computed target width to saturate to 0 via Rust's defined float-to-uint cast, which is then passed to imageproc::seam_carving::shrink_width — a function that panics when given a width below 2, crashing the process. This shares the same missing-input-validation root cause as the sibling `scale` finding in the same file but is an independently fixable, distinct code path.
AI Analysis
Technical Summary
The vulnerability exists in imagecli's carve <ratio> pipeline operation (Carve::apply() in src/image_ops.rs). The code asserts that the ratio is less than or equal to 1.0 but does not check if it is positive. When a negative ratio is provided, the computed target width saturates to 0 due to Rust's float-to-uint cast behavior. This zero width is passed to imageproc::seam_carving::shrink_width, which panics if the width is below 2, causing the process to crash. This is a distinct but related issue to a similar missing input validation in the scale operation within the same file.
Potential Impact
The impact is a denial of service caused by an application crash when a negative ratio is supplied to the carve operation. There is no confidentiality, integrity, or information disclosure impact reported. The CVSS score of 7.5 reflects a high severity due to the remote, unauthenticated nature of the crash and the lack of user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid supplying negative values to the carve <ratio> operation to prevent crashes.
CVE-2026-70378: CWE-1284 Improper Validation of Specified Quantity in Input in theotherphil imagecli
Description
imagecli's `carve <ratio>` pipeline operation (Carve::apply() in src/image_ops.rs) only asserts `ratio <= 1.0`, never validating that the ratio is positive. A negative ratio (e.g. -5) causes the computed target width to saturate to 0 via Rust's defined float-to-uint cast, which is then passed to imageproc::seam_carving::shrink_width — a function that panics when given a width below 2, crashing the process. This shares the same missing-input-validation root cause as the sibling `scale` finding in the same file but is an independently fixable, distinct code path.
CVSS v3.1
Score 7.5high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in imagecli's carve <ratio> pipeline operation (Carve::apply() in src/image_ops.rs). The code asserts that the ratio is less than or equal to 1.0 but does not check if it is positive. When a negative ratio is provided, the computed target width saturates to 0 due to Rust's float-to-uint cast behavior. This zero width is passed to imageproc::seam_carving::shrink_width, which panics if the width is below 2, causing the process to crash. This is a distinct but related issue to a similar missing input validation in the scale operation within the same file.
Potential Impact
The impact is a denial of service caused by an application crash when a negative ratio is supplied to the carve operation. There is no confidentiality, integrity, or information disclosure impact reported. The CVSS score of 7.5 reflects a high severity due to the remote, unauthenticated nature of the crash and the lack of user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid supplying negative values to the carve <ratio> operation to prevent crashes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- TuranSec
- Date Reserved
- 2026-08-04T07:13:07.993Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a72e5cbbf8831d539735237
Added to database: 08/05/2026, 07:27:07 UTC
Last enriched: 08/05/2026, 07:41:56 UTC
Last updated: 08/06/2026, 00:41:15 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.