Skip to content
Heist/ feed
Back to feed
Medium

Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise

Type: advisorySources: Official CVE List

Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefore execute a signed C integer overflow in xsize += dx, producing a large positive width from a negative mathematical result. Applications that use getlength(), getsize(), or derived layout, quota, serialization, or allocation calculations can experience logic-integrity errors or resource consumption, while the high-level mask path commonly retains a decompression-bomb check. This issue is fixed in version 13.0.0.

Products
Pillow
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-96641
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 18:14 UTC · Revision 2

Source evidence

Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise

core-cve · Original source

Published 21 Oct 2026, 20:51 UTC

Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefore execute a signed C integer overflow in xsize += dx, producing a large positive width from a negative mathematical result. Applications that use getlength(), getsize(), or derived layout, quota, serialization, or allocation calculations can experience logic-integrity errors or resource consumption, while the high-level mask path commonly retains a decompression-bomb check. This issue is fixed in version 13.0.0.

cve:CVE-2026-96641

Pillow

Fixed versions: Not specified

Complete source record
{
  "id": "7ca5d0edd76892a78ff43e44931f86efd9ae3ef28a3001bba397e29caefdb54c",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-96641",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise",
    "summary": "Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefore execute a signed C integer overflow in xsize += dx, producing a large positive width from a negative mathematical result. Applications that use getlength(), getsize(), or derived layout, quota, serialization, or allocation calculations can experience logic-integrity errors or resource consumption, while the high-level mask path commonly retains a decompression-bomb check. This issue is fixed in version 13.0.0.",
    "evidence": "cve:CVE-2026-96641",
    "products": [
      {
        "name": {
          "value": "Pillow",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-96641",
      "aliases": [
        "CVE-2026-96641"
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 6.5,
            "attackVector": "NETWORK",
            "baseSeverity": "MEDIUM",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
            "integrityImpact": "NONE",
            "userInteraction": "REQUIRED",
            "attackComplexity": "LOW",
            "availabilityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "NONE"
          }
        }
      ],
      "affected": [
        {
          "vendor": "python-pillow",
          "product": "Pillow",
          "versions": [
            {
              "status": "affected",
              "version": "< 13.0.0"
            }
          ]
        }
      ],
      "modified": "2026-10-28T01:50:42.160Z",
      "provider": "cve",
      "references": [
        "https://github.com/python-pillow/Pillow/security/advisories/GHSA-4rm8-3hmm-39fg",
        "https://github.com/python-pillow/Pillow/pull/10010",
        "https://github.com/python-pillow/Pillow/commit/80de4be9e38d3a6148dd4d8491eb80cd12b760a4",
        "https://github.com/python-pillow/Pillow/releases/tag/13.0.0"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2026-96641",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-28T01:50:02.182605Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-28T01:50:42.160Z"
            }
          }
        ],
        "cna": {
          "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
          "shortName": "GitHub_M",
          "dateUpdated": "2026-10-21T20:51:24.388Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-96641",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 406247,
  "published_at": "2026-10-21T20:51:24.388+00:00"
}