GHSA-gg2r-wvfm-q9rx

Suggest an improvement
Source
https://github.com/advisories/GHSA-gg2r-wvfm-q9rx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-gg2r-wvfm-q9rx/GHSA-gg2r-wvfm-q9rx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-gg2r-wvfm-q9rx
Aliases
Published
2026-10-21T21:12:56Z
Modified
2026-10-21T21:30:26Z
Severity
  • 8.7 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
Pillow: MSP RLE decoder expands a tiny file into unbounded memory
Details

Summary

The MSP RLE decoder expands run-length data into an in-memory buffer with no cap tied to the declared image size. A small file that passes the pixel-count check can force hundreds of megabytes or more of allocation when the application loads pixels.

Details

The MSP decoder writes each run into an unbounded io.BytesIO and can expand roughly 85x per run:

  • src/PIL/MspImagePlugin.py:144-146

Impact

Memory-exhaustion denial of service from a tiny crafted image in any application that loads pixels. The expansion is decoupled from the declared pixel count, so MAX_IMAGE_PIXELS does not bound it.

Database specific
{
    "cwe_ids":  [
        "CWE-409"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-21T21:12:56Z",
    "nvd_published_at":  "2026-10-19T22:17:09Z",
    "severity":  "HIGH"
}
References

Affected packages

PyPI / pillow

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.1.0
Fixed
13.0.0

Affected versions

4.*
4.1.0
4.1.1
4.2.0
4.2.1
4.3.0
5.*
5.0.0
5.1.0
5.2.0
5.3.0
5.4.0.dev0
5.4.0
5.4.1
6.*
6.0.0
6.1.0
6.2.0
6.2.1
6.2.2
7.*
7.0.0
7.1.0
7.1.1
7.1.2
7.2.0
8.*
8.0.0
8.0.1
8.1.0
8.1.1
8.1.2
8.2.0
8.3.0
8.3.1
8.3.2
8.4.0
9.*
9.0.0
9.0.1
9.1.0
9.1.1
9.2.0
9.3.0
9.4.0
9.5.0
10.*
10.0.0
10.0.1
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.1.1
12.2.0
12.3.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-gg2r-wvfm-q9rx/GHSA-gg2r-wvfm-q9rx.json"