CVE-2026-70378 in imagecliinfo

Summary

by MITRE • 08/05/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 08/05/2026

The vulnerability exists within imagecli's carving functionality where the ratio parameter validation is incomplete, creating a critical input handling flaw that can lead to application crashes and potential denial of service conditions. The Carve::apply() function in src/image_ops.rs performs only a maximum value check of 1.0 for the ratio parameter without ensuring that the value remains positive, establishing a clear violation of input validation principles. This weakness falls under CWE-252, which addresses missing or insufficient validation of input parameters, and represents a classic example of inadequate boundary checking in image processing pipelines.

The technical implementation flaw manifests when negative ratio values are passed to the carving operation, specifically causing a cascade of type conversion issues that ultimately result in a process panic. When a negative ratio such as -5 is provided, the floating-point value undergoes a defined cast to unsigned integer type in rust, which saturates the value to zero due to the mathematical properties of unsigned integer overflow behavior. This zero value then gets passed to the imageproc::seam_carving::shrink_width function, which has an explicit precondition requiring width values greater than or equal to 2, triggering an immediate panic condition that terminates the entire application process.

The operational impact of this vulnerability extends beyond simple crash conditions to potentially affect system availability and resource management in applications that rely on imagecli for automated processing workflows. Attackers could exploit this weakness by providing malicious negative ratio values through any interface that accepts carving parameters, leading to denial of service scenarios where legitimate users cannot process images through the affected pipeline. This vulnerability demonstrates how seemingly minor input validation gaps can create severe operational consequences, particularly in systems where image processing pipelines are critical components of larger workflows.

Mitigation strategies should focus on implementing comprehensive input validation for the carve operation, specifically adding a positive value constraint to the ratio parameter validation logic. The fix should ensure that ratio values are validated to be both within acceptable bounds (0.0 to 1.0) and positive, preventing negative values from reaching the downstream processing functions. This approach aligns with ATT&CK technique T1499.004 which addresses resource exhaustion through process termination and represents a fundamental defensive measure against input-based crash conditions. Additionally, implementing proper error handling and graceful degradation mechanisms would provide better user experience while maintaining system stability during unexpected input scenarios.

The vulnerability shares the same root cause as similar input validation issues found in the sibling scale operation within the same file, indicating a broader pattern of insufficient parameter validation across image processing functions. However, this represents an independently fixable code path that requires specific attention to the carving logic's ratio handling without affecting other operations. This demonstrates how software vulnerabilities often manifest in related code sections but require targeted fixes for each distinct code path. The issue highlights the importance of comprehensive input validation testing and proper type handling in systems processing user-provided parameters, particularly in image manipulation libraries where mathematical operations can have cascading effects on system stability and resource allocation throughout complex processing pipelines.

Responsible

TuranSec

Reservation

08/04/2026

Disclosure

08/05/2026

Moderation

accepted

CPE

ready

EPSS

0.00278

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!