---
id: CVE-2026-70378
title: >-
  imagecli's pipeline operation (Carve::apply in src/image_ops.rs) only asserts
  , never validating that the ratio is positive
summary: >-
  imagecli's pipeline operation (Carve::apply in src/image_ops.rs) only asserts
  , 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 ca…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-1284
published: '2026-08-05'
updated: '2026-08-10'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-70378'
references:
  - url: 'https://github.com/theotherphil/imagecli/issues/67'
    label: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
  - url: 'https://github.com/theotherphil/imagecli/issues/67'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.0046
epssPercentile: 0.37243
ingestedAt: '2026-08-10T12:39:48.165Z'
---

## Overview

imagecli's pipeline operation (Carve::apply in src/image_ops.rs) only asserts , 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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
