Security fix · CVE-2026-112901
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 28, 2026 · Pillow is a Python
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-112901. EPSS is 0.53%. Act only if a listed version of Pillow is a Python is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High7.5
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.53%
- Remediation
- Version ranges on file
- Affected products
- Bitnami pillow · PyPI pillow · pip Pillow
A crafted 512-byte file makes Pillow's spend about six minutes of processor time on one core before it gives up with . Anyone who can hand bytes to an application that opens images with Pillow's default settings can trigger this, for example through an upload form, a thumbnailer, or a service that checks whether a blob is an image. A few such files sent at once can tie up a typical pool of worker processes. The cause is the regular expression in , which (line 58) runs over the first 512 bytes of any stream whose prefix starts with . Several adjacent parts of the pattern can match the same characters. overlaps with in the width and height lines and with in the optional hotspot lines, and closing the hotspot group overlaps with the following . The header sets a run of k spaces after each and a run of k line terminators after , then omits the after . That forces Python's backtracking matcher to try every way of splitting those runs and rescan the remaining bytes each time. The cost grows roughly as k to the fifth power: k = 60 measured 375 s, while a well-formed XBM of the same size opens in about 40 ms. Because this happens before any format is identified, none of Pillow's size, pixel-count or decompression-bomb limits apply, and upload size limits do not help because the file is tiny. repeats the cost on every chunk until the stream is identified. The only existing mitigation is passing a allowlist that excludes . The attached reproducer opens the same header with and without the trailing . The valid version opens as XBM in 52 ms. The broken version takes 0.1 s, 0.75 s, 3.0 s and 8.6 s at k = 10, 15, 20 and 25, and the slow k = 60 case is not run. This is the same class of bug as CVE-2021-25292 in , but in a different plugin and reachable from plain . ## Details identifies an XBM file by running the module-level regex over the first 512 bytes of the stream. The pattern has several adjacent quantifier pairs that can consume the same characters, followed by a tail that
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- Bitnami pillow0 → 13.0.0
- PyPI pillow0 → 13.0.0
- pip Pillow<= 12.3.0
How to fix CVE-2026-112901
Upgrade
CVE-2026-112901 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected <= 12.3.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-112901. EPSS is 0.53%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with Pillow <= 12.3.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-1333: Inefficient Regular Expression Complexity. EPSS 0.53%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 19, 2026 · NIST NVD
Detected
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. Th
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. Th
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. Th
Oct 21, 2026 · GitHub Advisory Database
Updated
A crafted 512-byte file makes Pillow's spend about six minutes of processor time on one core before it gives up with . Anyone who can hand bytes to an application that opens images with Pillow's default settings can trigger this, for example through an upload form, a thumbnailer, or a service that checks whether a blob is an image. A few such files sent at once can tie up a typical pool of worker
Oct 26, 2026 · GitHub Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · GitHub Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · GitHub Advisory Database
Updated
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. Th
Oct 28, 2026 · PyPA Advisory Database
Updated
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. Th
Sources
- CVE.orgVulnerability recordCVE-2026-112901
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112901
30-day exploitation probability 0.53%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-xgh8-jp6q-p5x8
GitHub Advisory Database record mirrored by OSV.
github.com - NIST NVDVulnerability recordCVE-2026-112901
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to th
nvd.nist.gov - OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112901
Pillow: ReDoS in XbmImagePlugin: 512-byte file stalls Image.open() for minutes
osv.dev - PyPA Advisory DatabasePackage advisoryGHSA-xgh8-jp6q-p5x8
Pillow: ReDoS in XbmImagePlugin: 512-byte file stalls Image.open() for minutes
osv.dev - PyPA Advisory DatabasePackage advisoryPYSEC-2026-4335
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to th
osv.dev
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 31, 2026
- GitHub Advisory DatabaseOct 29, 2026
- OpenSSF OSV / OSV ScannerOct 29, 2026
- PyPA Advisory DatabaseOct 28, 2026
- PyPA Advisory DatabaseOct 28, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026