{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-96778",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2026-09-23T16:25:20.414Z",
        "datePublished": "2026-10-21T20:58:24.238Z",
        "dateUpdated": "2026-10-21T20:58:24.238Z"
    },
    "containers": {
        "cna": {
            "title": "Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-787",
                            "lang": "en",
                            "description": "CWE-787: Out-of-bounds Write",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV4_0": {
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "PRESENT",
                        "privilegesRequired": "NONE",
                        "userInteraction": "PASSIVE",
                        "vulnConfidentialityImpact": "HIGH",
                        "vulnIntegrityImpact": "HIGH",
                        "vulnAvailabilityImpact": "HIGH",
                        "subConfidentialityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "subAvailabilityImpact": "NONE",
                        "baseScore": 7.7,
                        "baseSeverity": "HIGH",
                        "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
                        "version": "4.0"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7"
                },
                {
                    "name": "https://github.com/python-pillow/Pillow/pull/10124",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/python-pillow/Pillow/pull/10124"
                },
                {
                    "name": "https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b"
                },
                {
                    "name": "https://github.com/python-pillow/Pillow/releases/tag/13.0.0",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/python-pillow/Pillow/releases/tag/13.0.0"
                }
            ],
            "affected": [
                {
                    "vendor": "python-pillow",
                    "product": "Pillow",
                    "versions": [
                        {
                            "version": ">= 9.4.0, < 13.0.0",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2026-10-21T20:58:24.238Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "Pillow is a Python imaging library. From 9.4.0 until 13.0.0, ImagingJpegEncode() in src/libImaging/JpegEncode.c can call jpeg_write_marker() for a JPEG COM comment when an ICC profile has exactly filled the 65536-byte encoder buffer. libjpeg writes one byte before checking the exhausted free_in_buffer counter, which then wraps and permits the attacker-controlled comment and subsequent compressed image data to overwrite adjacent heap memory. Re-saving an untrusted image as JPEG while preserving its ICC profile and forwarded comment can crash the process and may enable code execution in suitable runtime and heap layouts. This issue is fixed in version 13.0.0."
                }
            ],
            "source": {
                "advisory": "GHSA-g7cr-3p24-7wf7",
                "discovery": "UNKNOWN"
            }
        }
    }
}