CVE-2026-112396

Source
https://cve.org/CVERecord?id=CVE-2026-112396
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-112396.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-112396
Aliases
Downstream
Published
2026-10-19T21:02:15Z
Modified
2026-10-21T09:40:00Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
Details

Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and later cleanup flushes through the write callback into freed memory, which can crash the process and may enable code execution. This issue is fixed in version 13.0.0.

Database specific
{
    "cna_assigner":  "GitHub_M",
    "cwe_ids":  [
        "CWE-416"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112396.json",
    "unresolved_ranges":  [
        {
            "extracted_events":  [
                {
                    "range":  [
                        {
                            "introduced":  "11.3.0"
                        },
                        {
                            "fixed":  "13.0.0"
                        }
                    ],
                    "source":  "AFFECTED_FIELD",
                    "strategy":  "StringRangeExpression"
                }
            ]
        },
        {
            "extracted_events":  [
                {
                    "range":  [
                        {
                            "fixed":  "13.0.0"
                        }
                    ],
                    "source":  "DESCRIPTION"
                }
            ]
        }
    ]
}
References

Affected packages

Git / github.com/python-pillow/pillow

Affected ranges

Type
GIT
Repo
https://github.com/python-pillow/pillow
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "fixed":  "dc95da20207827a062cfbf551ee9f6031465a8bb"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        },
        {
            "original_tag":  "13.0.0",
            "range":  [
                {
                    "fixed":  "293218ad059d994baf1777d882911bed6a49704a"
                }
            ],
            "source":  "REFERENCES_TAG"
        }
    ]
}

Affected versions

1.*
1.0
1.2
1.7.7
1.7.8
10.*
10.0.0
10.1.0
10.2.0
10.3.0
10.4.0
11.*
11.0.0
11.1.0
11.2.1
11.3.0
12.*
12.0.0
12.1.0
12.2.0
12.3.0
2.*
2.0.0
2.1.0
2.2.0
2.2.1
2.3.0
2.5.0
2.7.0
2.8.0
2.8.1
2.9.0
2.9.0.dev0
2.9.0.dev1
2.9.0.dev2
3.*
3.1.0
3.1.0-rc1
3.2.0
3.3.0
3.4.0
4.*
4.0.0
4.0.0a
4.1.0
4.2.0
4.3.0
5.*
5.0.0
5.1.0
5.2.0
5.3.0
5.4.0
6.*
6.0.0
6.1.0
6.2.0
7.*
7.0.0
7.1.0
7.2.0
8.*
8.0.0
8.1.0
8.2.0
8.3.0
8.4.0
9.*
9.0.0
9.1.0
9.2.0
9.3.0
9.4.0
9.5.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-112396.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "137916136550594062191645542618965140668",
            "length":  220
        },
        "id":  "CVE-2026-112396-3046e8eb",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/python-pillow/pillow/commit/dc95da20207827a062cfbf551ee9f6031465a8bb",
        "target":  {
            "file":  "src/libImaging/TiffDecode.c",
            "function":  "ImagingLibTiffEncodeCleanup"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "215138058649496890191450993392544403904",
            "length":  1173
        },
        "id":  "CVE-2026-112396-b7d5b236",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/python-pillow/pillow/commit/dc95da20207827a062cfbf551ee9f6031465a8bb",
        "target":  {
            "file":  "src/libImaging/TiffDecode.c",
            "function":  "ImagingLibTiffEncode"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "34652759800355931854110175795888162719",
                "40806200561458035480576927189885160395",
                "174283158764298985856820781219374124975",
                "10636636792197175503229399464877867217",
                "33410370181079635730303580500823149617",
                "9636048296545295789497148558702399495",
                "6846392364349138562273958361845332428",
                "39951687303361737558850915393323669903",
                "188146856781064700613322513555654142602",
                "37215112949313155259929074665224050738",
                "252027958857477701964479168062931549835",
                "105304792341668154723377291264453368336",
                "283527489864328979510408964733774360781",
                "21979705861767923060742969853232273846",
                "129567669592317974903374868493372468760",
                "76822054242633744828148977590286400904",
                "133560539104904575298737828374239260724",
                "267816383866653841674601773669614602308",
                "164139687780952682061056287673578196614",
                "268092764334619252952810451808803312271",
                "80948247014282171759082547258592720985",
                "327482467974164094891909318240477455261",
                "321523664739320428061664562898352648441",
                "154208089516716811290247553521893252698",
                "153863768716062663275174185844038601315",
                "268092764334619252952810451808803312271",
                "215117817425676335248841896663622924622",
                "208467056832781693943338375928406284274",
                "330421624986422982934920103212375836686",
                "92809985739244542437322458426589799546",
                "5621445318293274174508370771651075975"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2026-112396-dd25eaac",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/python-pillow/pillow/commit/dc95da20207827a062cfbf551ee9f6031465a8bb",
        "target":  {
            "file":  "src/libImaging/TiffDecode.c"
        }
    }
]
vanir_signatures_modified
"2026-10-21T09:40:00Z"