There is a heap buffer overflow when writing a sufficiently large (>64k encoded with default settings) image in the DDS format due to writing into a buffer without checking for available space.
This only affects users who save untrusted data as a compressed DDS image.
This was introduced in Pillow 11.2.0 when the feature was added.
{
"nvd_published_at": "2025-07-01T19:15:27Z",
"cwe_ids": [
"CWE-122"
],
"severity": "HIGH",
"github_reviewed": true,
"github_reviewed_at": "2025-07-01T17:29:37Z"
}