7.5high
imagecli - Negative carve Ratio Bypasses Bounds Check and Crashes Process via Reachable Panic
- Severity
- 7.5high CVSS:3.1 by TuranSec
- Exploit likelihood
- 0.33% (higher than 27% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- TuranSec
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| theotherphil imagecli | up to 0.2.1 | CVE List |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
NVD (es)
La operación de pipeline ’carve [ratio]’ de imagecli (Carve::apply() en src/image_ops.rs) solo afirma ’ratio menor o igual que 1.0’, nunca validando que la relación sea positiva. Una relación negativa (p. ej., -5) hace que el ancho objetivo calculado se sature a 0 a través de la conversión de flotante a entero sin signo (float-to-uint) definida por Rust, que luego se pasa a imageproc::seam_carving::shrink_width - una función que entra en pánico cuando se le da un ancho inferior a 2, bloqueando el proceso. Esto comparte la misma causa raíz de validación de entrada faltante que el hallazgo hermano ’scale’ en el mismo archivo, pero es una ruta de código distinta y corregible de forma independiente.
References
| https://github.com/theotherphil/imagecli/issues/67 | exploit, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-70378 changed 2026-08-10 | CVE Terms of Use |
| NVD | CVE-2026-70378 changed 2026-10-24 | Public domain |