Search

Find a vulnerability

Search criteria

    1 vulnerability by kosinix

    CVE-2026-71202 (GCVE-0-2026-71202)

    Vulnerability from cvelistv5 – Published: 2026-08-05 06:58 – Updated: 2026-08-05 06:58
    VLAI
    Title
    raster: Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic
    Summary
    The raster Rust crate's crop() function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height. When an offset exceeds the corresponding source dimension, `width2 - offset_x` (or the height equivalent) underflows to a negative i32, which release builds do not trap; the negative value is then cast to usize inside Image::blank()'s Vec::with_capacity() call, triggering a capacity-overflow panic and crashing the process on a single crafted crop request.
    CWE
    Assigner
    References
    Impacted products
    Vendor Product Version
    kosinix raster Affected: 0 , ≤ 0.2.1 (custom)
    Create a notification for this product.
    Credits
    agrresore
    Show details on NVD website

    {
      "containers": {
        "cna": {
          "affected": [
            {
              "defaultStatus": "unknown",
              "product": "raster",
              "programFiles": [
                "src/editor.rs"
              ],
              "vendor": "kosinix",
              "versions": [
                {
                  "lessThanOrEqual": "0.2.1",
                  "status": "affected",
                  "version": "0",
                  "versionType": "custom"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "type": "finder",
              "value": "agrresore"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "The raster Rust crate\u0027s crop() function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height. When an offset exceeds the corresponding source dimension, `width2 - offset_x` (or the height equivalent) underflows to a negative i32, which release builds do not trap; the negative value is then cast to usize inside Image::blank()\u0027s Vec::with_capacity() call, triggering a capacity-overflow panic and crashing the process on a single crafted crop request."
            }
          ],
          "metrics": [
            {
              "other": {
                "content": {
                  "value": "HIGH"
                },
                "type": "CVSS_3.1_severity"
              }
            },
            {
              "cvssV3_1": {
                "baseScore": 7.5,
                "baseSeverity": "HIGH",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-191",
                  "description": "CWE-191 Integer Underflow",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-08-05T06:58:53.827Z",
            "orgId": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
            "shortName": "TuranSec"
          },
          "references": [
            {
              "url": "https://github.com/kosinix/raster/issues/30"
            }
          ],
          "title": "raster: Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
        "assignerShortName": "TuranSec",
        "cveId": "CVE-2026-71202",
        "datePublished": "2026-08-05T06:58:53.827Z",
        "dateReserved": "2026-08-05T06:56:15.798Z",
        "dateUpdated": "2026-08-05T06:58:53.827Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }