Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

docs(security): correct the Pillow exposure scope and the 3.10 end-of-life date (#2096)

Kevin22109ee0c6d8
diff --git a/SECURITY.md b/SECURITY.md
index a40912b9..20b98690 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -239,18 +239,27 @@ are accepted in `osv-scanner.toml`.
#### Pillow 12.3.0 on Python 3.10
Pillow 13.0.0 fixes 28 advisories against 12.3.0, 19 of which also appear as
-Dependabot alerts: buffer overflows in the TIFF and JPEG decoders, unbounded
-recursion over the PDF page tree, and an argument injection in the Ghostscript
-call. Pillow 13 requires Python 3.11 or newer,
+Dependabot alerts: heap overflows and a use-after-free in the TIFF save path, a
+heap overflow in the JPEG decoder reached through `draft()` and `thumbnail()`,
+unbounded recursion over the PDF page tree, and an argument injection in the
+Ghostscript call. Pillow 13 requires Python 3.11 or newer,
while Semantica still declares `requires-python = ">=3.10,<3.14"`, so `uv.lock`
keeps a 12.3.0 resolution for `python_full_version < '3.11'`.
- **Scope**: Python 3.10 installs only. Every requirements file that pins
pillow has it at 13.0.0, which carries no advisories.
-- **Exposure**: `ImageParser` passes caller-supplied bytes to
- `PIL.Image.open()`, so parsing untrusted images on 3.10 reaches the affected
- decoders. Text, JSON and document parsing are unaffected, and so are images
- the application produces itself.
+- **Exposure through images**: `ImageParser` passes caller-supplied bytes to
+ `PIL.Image.open()`. Since #2079 its defaults accept only PNG, JPEG, WebP and
+ BMP, which keeps the TIFF, PDF, GIF, EPS, MSP and XBM advisories out of
+ reach. GHSA-5xm2 (APNG canvas allocation) is reachable with those defaults,
+ and widening `allowed_formats` widens the exposure.
+- **Exposure through documents**: `DoclingParser` takes image files directly
+ and parses DOCX, PPTX and HTML with embedded images, and docling opens those
+ with every Pillow plugin enabled, so `ImageParser`'s allowlist does not
+ constrain it (inferred from docling's source, see #2067). `pdf_parser` goes
+ through pdfplumber and `pptx_parser` through python-pptx, both Pillow-backed.
+ Text and JSON parsing do not touch Pillow, and neither do images the
+ application produces itself.
- **Mitigation**: none within 12.x, because no patched 12.x exists. Running on
Python 3.11 or newer installs Pillow 13.
- **Cost of dropping 3.10**, measured on 2026-10-23: `uv.lock` loses 1,585
@@ -261,7 +270,8 @@ keeps a 12.3.0 resolution for `python_full_version < '3.11'`.
README badge, and about eleven lines of documentation.
- **Downloads on 3.10**: 9.9% (5,403 of 54,434) between 2026-09-18 and
2026-10-22, from pypistats `python_minor`.
-- **Revisit**: Python 3.10 reaches end of life on 2026-10-31, and the 28 IDs in
+- **Revisit**: Python 3.10 reached end of life on 2026-10-01
+ (<https://devguide.python.org/versions/>), and the 28 IDs in
`osv-scanner.toml` are accepted until 2027-01-21. Tracked in #2067.
## Best Practices for Users