A McIdas AREA file's row stride over-reads Pillow's memory map
Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)
- Advisory
- CVE-2026-54058
- Library
- Pillow, pillow on PyPI
- Published
- Severity
- not scored upstream
- Affected
- < 12.3.0
- Fixed in
- 12.3.0
- Reaches you
- by opening a file
What triggers it
Image.open on a McIdas AREA file, from a filename, whose tile declares a stride shorter than a row.
What sillybos does
Refused by default
sillybos refuses the triggering file under its default policy, through the format check.
A McIdas file is not one of the four formats a scan can be; sillybos does not know the format and refuses it as unknown before Pillow sees it. The same mmap path serves uncompressed TIFF, but the record names only McIdas as reaching the flaw.
Proposed from the advisory's text on 2026-11-01, as part of folding the backfill into the record; confirmed by a person on 2026-11-03.
Proved by this test in the sillybos suite, which builds the triggering file from bytes and checks that it is refused:
How to protect yourself
In general. Upgrade to Pillow 12.3.0.
Specifically. Open with formats limited to the readers you mean to use, as open_checked does; an unknown format is refused.
The general advice applies to every row here.
Sources
- https://osv.dev/vulnerability/GHSA-62p4-gmf7-7g93
- https://osv.dev/vulnerability/PYSEC-2026-3493
- The record entry, triaged 2026-11-03, last checked 2026-11-03