pillow 13.0.0
- Source
- https://github.com/python-pillow/Pillow
- Artifact scanned
pillow-13.0.0.tar.gz- Compared with
pillow-12.3.0.tar.gz(4 signals introduced since)- Files
- 581 scanned, 1147 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 61 info
- Scan time
- 41.4 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 56 of 56 warn and critical signals; 56 demoted to info.
- Disclude version
- 4.3.0
- Scanned (UTC)
- 2026-10-23 01:58
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
b b ), # 16x16 strip with duplicatedlikely benign Base64-encoded test image data in a libtiff test.Reasoning
Base64 blob in a test fixture encoding a small TIFF image; a test data literal in an image library is expected.
-
info
warn→ info by reviewidentifier-confusable-collisionsrc/libImaging/Draw.c:248:9new in this releaseint x1, int y1, int ink, point_handler point,dismissed Drawing function parameter names are flagged by the confusable heuristic.Reasoning
The flagged pair is the y1/yo style coordinate parameter names of a line/point drawing function. Standard numeric naming, not an attack.
-
info
warn→ info by reviewidentifier-confusable-collisionsrc/libImaging/Mode.c:150:6new in this release= , = , = , = ,likely benign Pillow L-mode rawmode table entries flagged for identifier skeleton collision.Reasoning
Ordinary Pillow L-mode rawmode table entries (L;1, L;2I, L;16B) with normal ASCII identifiers; the collision is a false positive from the 1/l/I equivalence.
-
info
warn→ info by reviewidentifier-confusable-collisionsrc/libImaging/Mode.h:148:5new in this releaseIMAGING_RAWMODE_LX, IMAGING_RAWMODE_L_1, IMAGING_RAWMODE_L_16, IMAGING_RAWMODE_L_16B,likely benign Pillow L-mode rawmode constant declarations in Mode.h.Reasoning
Header enum entries for L-mode rawmodes; ordinary declarations flagged only due to skeleton collision.
-
=likely benign Binary TIFF test fixture built from a bytes literal.Reasoning
Bytes literal with \x escapes forming a TIFF header and tags is the expected shape for an image-parsing test fixture.
-
=likely benign Pickle byte string fixture for PIL pickling tests.Reasoning
Pickled PIL PngImageFile object used to test pickling round-trips; the payload is a legitimate test fixture for the library's own class.
-
if ; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_AOM=SYSTEM) HAS_ENCODER=1 -
if ; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_DAV1D=SYSTEM) HAS_DECODER=1 -
if ; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_LIBGAV1=SYSTEM) HAS_DECODER=1 -
if ; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_RAV1E=SYSTEM) HAS_ENCODER=1 -
if ; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_SVT=SYSTEM) HAS_ENCODER=1 -
}: =likely benign Build script resolves a module name via globals() during feature detection.Reasoning
Looks up a root module by name from globals() in the build script's dependency/feature detection, reading environment variables; a plausible build-config pattern with no network or exec, though dynamic lookup merits a glance.
-
=likely benign Populates module globals from a static compression table.Reasoning
Module-level loop populates constants into vars() to define names from a COMPRESSIONS table; a common, harmless metaprogramming idiom with static keys.
-
likely benign Base64-encoded sample PNG in ImageFont documentation.
Reasoning
Base64 in a docstring or doctest-like example encoding a small PNG image; no decode-and-execute behavior.
-
=likely benign Compiles the ImageMath expression string for evaluation.Reasoning
ImageMath evaluates user-supplied arithmetic expressions by compiling them in eval mode with a restricted scanner that validates names; this is an intentional, sandboxed feature, though compile on input is a notable surface.
-
# nosec return 1likely benign Launches an external image viewer via os.system.Reasoning
os.system runs a viewer command built from get_command with file path; this is the expected image-viewer dispatch in PIL, marked nosec, and the command is internal, not attacker-controlled in normal use, though path injection is a real concern.
-
= =likely benign Decompresses FlateDecode PDF stream content.Reasoning
FlateDecode decompression of PDF stream data is the standard PDF filter implementation for parsing user-supplied PDFs; expected behavior.
-
= rb = rb = rb = rblikely benign Regex character class with PDF whitespace octal escapes.Reasoning
Octal escapes in raw regex character classes for PDF whitespace and delimiters; a legitimate lexer pattern.
-
= rb = rb = rb = + blikely benign Regex character class with PDF whitespace octal escapes.Reasoning
Same PDF whitespace regex character class; legitimate lexer code.
-
= rb = rb = + b = + blikely benign Regex whitespace pattern using octal escapes.Reasoning
Same PDF whitespace regex pattern; legitimate lexer code.
-
= =likely benign Size-limited zlib decompression of PNG text chunks.Reasoning
Bounded zlib decompression of PNG text chunks with a max length, the standard safe handling of PNG zTXt/iTXt data.
-
# default palette taken from piffo 0.93 by Hans Häggström b b blikely benign Default 256-colour palette constant embedded as a bytes literal in the WAL image reader.Reasoning
The bytes literal is a 768-byte default palette (grayscale-ish ramp from 0x01 upward) with a comment crediting its source. Pillow's WAL reader ships exactly this kind of constant table. Binary-shape flagging on a palette is a false positive.
-
b b b blikely benign Continuation of the default palette byte table.Reasoning
Raw-pass hex-escape run inside the same palette constant. The entropy is low and the values form a smooth ramp, which is typical of palette data rather than an encoded payload.
-
b b b blikely benign Further rows of the default palette constant.Reasoning
Raw-pass escape rows within the same palette table. Structure and values match colour data, and nothing here executes or decodes anything.
-
b b b blikely benign Palette byte rows in the WAL reader.Reasoning
Same palette constant, continued. No decoding or execution is present, and the byte pattern is a colour table.
-
b b b blikely benign Palette byte rows in the WAL reader.Reasoning
Palette data continues here. It is a static lookup table in the image reader, not a dropper blob.
-
b b b blikely benign Palette byte rows in the WAL reader.Reasoning
Raw hex-escape rows form a monotone colour ramp typical of a palette. No execution or decoding follows the literal.
-
b b b )likely benign Closing rows of the default palette constant.Reasoning
Final rows of the palette literal, closing the parenthesised constant. Nothing about it indicates a payload.
-
b b )likely benign Tail of the default palette constant.Reasoning
Last rows of the same palette constant. It is static colour data.
-
return Truelikely benign Optional-module availability probe using __import__ with a variable name.Reasoning
In Pillow's features.check_module, __import__ is called on a module name to test whether an optional dependency is installed. The name comes from a fixed set of internal module names, not untrusted input, and the ModuleNotFoundError handler confirms the intended use.
-
returnlikely benign Dynamic import to read an optional library's version attribute.Reasoning
Version lookup imports a known optional dependency by name and reads its version attribute. This is the standard way Pillow reports library versions and does not take attacker-controlled input.
-
= returnlikely benign Feature-flag lookup via dynamic import of an internal module.Reasoning
Feature check imports a Pillow-internal module named by the caller-side table and reads a flag attribute. Dynamic import of a fixed internal name is a normal feature-detection pattern.
-
returnlikely benign Dynamic import for dependency version reporting.Reasoning
Same version-lookup helper as line 63, importing a known dependency and reading its version. Legitimate and not reachable from untrusted data.
-
; func = ; iflikely benign Runtime resolution of Tk shared-library function pointers via dlsym.Reasoning
Pillow's Tk imaging module resolves Tk library functions at runtime with dlsym on Unix so it does not link against libtk directly. The symbol names are fixed internal constants, and the NULL check and dlerror handling are standard for this pattern.
-
/* Try loading from the main program namespace first */ main_program = ; iflikely benign dlopen(NULL) probes the main program's namespace for the Tk/Tkinter loader function.Reasoning
dlopen(NULL) is the standard way to look up symbols in the main program, a common pattern in Python C extensions. The snippet shows no attacker-controlled path or follow-on payload, and the file is Pillow's Tk integration code.
-
} tkinter_lib = ; iflikely benign dlopen loads the tkinter extension module file, using a path resolved at runtime.Reasoning
The path comes from a variable naming the tkinter shared library, which Pillow locates at runtime to bind to Tk. The non-literal path is expected for this kind of dynamic loader, and the snippet shows only error handling.
-
static struct ImagingAccessInstance accessors =dismissed Mode constant names in an accessor table trip the confusable-identifier heuristic.Reasoning
The collision is between identifiers like IMAGING_MODE_1 and IMAGING_MODE_L, which differ only by digit/letter confusables in an all-caps mode-name set. That is a naming artifact of the token pass, not obfuscation.
-
if else ifdismissed Image mode constants in a conversion dispatch are flagged by the confusable heuristic.Reasoning
The flagged identifiers are ordinary IMAGING_MODE_* constants compared in a mode dispatch, which the confusable heuristic falsely matches. No hidden or homoglyph-based code is shown.
-
int d; int x0, y0; int xmin, ymin, xmax, ymax; float dx;dismissed Short coordinate variable names collide visually under the confusable heuristic.Reasoning
The skeleton collision is between ordinary short coordinate names xo and yo (x0/xO-style pairs) in standard line-drawing variables. This is a naming false positive.
-
int d; int x0, y0; int xmin, ymin, xmax, ymax; float dx;dismissed Coordinate variable names in a declaration are flagged by the confusable heuristic.Reasoning
Same as the other finding in this declaration: the flagged pair is ordinary coordinate variable names (y0/y1/ymin style) within a standard drawing routine.
-
static inline voiddismissed Parameter names in a horizontal-line drawing helper trip the confusable heuristic.Reasoning
The flagged identifiers are ordinary hline8 parameters and locals (x0, x1 and related names). The visual collision is a benign artifact of digit and letter shapes.
-
int32_t py, pl, pr; int32_t cy, cl, cr; int8_t bufcnt; int8_t finished;dismissed Scanline buffer variable names are flagged by the confusable heuristic.Reasoning
The flagged identifiers are ordinary array and buffer names (cy, cl, cr with bufcnt/finished) in a polygon/scanline routine. The collision is a naming false positive.
-
voiddismissed Angle parameter names in normalize_angles are flagged by the confusable heuristic.Reasoning
The flagged names are the al/ar angle parameters of normalize_angles, a plain geometric helper. The collision is a visual artifact of short identifiers.
-
ifdismissed Mode constants in a validity check are flagged by the confusable heuristic.Reasoning
The flagged identifiers are the IMAGING_MODE_* constants used in a mode validity check, a standard pattern. The skeleton collision is a benign naming artifact.
-
Imaging imIn, int x0, int y0, int x1,dismissed Coordinate parameters in a geometry function are flagged by the confusable heuristic.Reasoning
The flagged names are the x0/x1 coordinate parameters of a geometry transform function. This is ordinary numeric naming with no hidden or homoglyph content.
-
int x0, int y0, int x1, int y1,dismissed Coordinate parameters in a geometry function are flagged by the confusable heuristic.Reasoning
The flagged names are the y0/y1 coordinate parameters that accompany the x-coordinates in the same geometry function. Standard naming, not obfuscation.
-
likely benign A platform header defines FLOAT32 as an alias for float.
Reasoning
Mapping FLOAT32 to float is a standard portable-typedef macro in Pillow's platform header. It is not a dangerous keyword override, and the header is the usual place for such definitions.
-
likely benign A platform header defines FLOAT64 as an alias for double.
Reasoning
Mapping FLOAT64 to double is the same portable type-alias macro as FLOAT32 in the platform header. It is ordinary configuration with no malicious effect.
-
= , = , = , = , = , = ,likely benign Pillow image mode enum constants in Mode.c whose names collide under confusable-skeleton normalization.Reasoning
Pillow's legitimate IMAGING_MODE_* enum names are visually confusable only because they contain 'I' and 'l' letters in identifiers like IMAGING_MODE_I and IMAGING_MODE_L; this is a naming artifact of the token skeleton normalization, not an attack. Plain ASCII, normal C enum definitions.
-
= , = , = ,likely benign Pillow raw mode table entries whose identifiers collide under the skeleton check.Reasoning
RAWMODE enum entries with ordinary ASCII names like IMAGING_RAWMODE_1 and IMAGING_RAWMODE_I; the collision comes from the normalization of I/1/l characters, not from hidden code.
-
= , = , = ,likely benign Pillow rawmode initializers for 1-bit variants colliding under skeleton normalization.Reasoning
Same pattern: standard Pillow rawmode identifiers such as IMAGING_RAWMODE_1_I and _1_8 in a plain string-mapping table.
-
IMAGING_MODE_1, IMAGING_MODE_CMYK, IMAGING_MODE_F,likely benign Pillow image mode enum declarations in Mode.h.Reasoning
Header enum declaring IMAGING_MODE_1, IMAGING_MODE_CMYK etc. Standard Pillow declarations; the skeleton collision is spurious.
-
// Non-rawmode aliases. IMAGING_RAWMODE_1, IMAGING_RAWMODE_CMYK, IMAGING_RAWMODE_F,likely benign Pillow rawmode alias enum declarations in Mode.h.Reasoning
Header enum of rawmode aliases with ordinary names; collision is a normalization false positive.
-
// Rawmodes IMAGING_RAWMODE_1_8, IMAGING_RAWMODE_1_I, IMAGING_RAWMODE_1_IR,likely benign Pillow rawmode constant declarations in Mode.h.Reasoning
Header enum of rawmode constants like IMAGING_RAWMODE_1_8 and _1_IR; ordinary declarations with no hidden content.
-
/* bilevel */ , , ,likely benign Pillow pack dispatch table rows referencing IMAGING_MODE_1 and rawmode constants.Reasoning
Pack table rows mapping mode and rawmode constants to packer functions; standard Pillow code with normal identifiers.
-
/* bilevel */ , , ,likely benign Pillow pack dispatch table entries referencing rawmode constants.Reasoning
Same pack dispatch table; the flagged rawmode identifiers are normal enum references.
-
iflikely benign Storage initialization branch for 1-bit image mode.Reasoning
Simple comparison of mode against IMAGING_MODE_1 to set bands and pixelsize for 1-bit images; ordinary logic.
-
static voidlikely benign Pillow unpacker function unpack18 for numpy boolean images.Reasoning
Function unpack18 is a 1-bit numpy boolean unpacker; the name and comment mention '|b1' which is a numpy dtype string. The collision is between unpack18 and a similar name under normalization, a benign naming artifact in a documented function.
-
/* bilevel */ , , ,likely benign Pillow unpack dispatch table rows for bilevel modes.Reasoning
Unpack dispatch table rows with normal Pillow mode and rawmode constants and unpacker function names.
-
/* bilevel */ , , ,likely benign Pillow unpack dispatch table entries referencing rawmode constants.Reasoning
Same unpack dispatch table; rawmode identifiers are ordinary enum references.
-
, , ,likely benign A lookup table in Pillow's Unpack.c maps image modes to raw-mode unpacker functions, and two of its constant names look alike under 0/O and 1/l/I folding.Reasoning
The snippet is a plain table of Pillow raw-mode unpacker entries (IMAGING_MODE_1 paired with IMAGING_RAWMODE_* constants and unpack functions). The collision is between identifiers that differ only by a visually ambiguous character, such as 1 versus I or l, which is a common naming artifact in C enums and not a sign of a deliberate homoglyph swap. Nothing in the snippet executes code or hides behaviour, and the file is a well-known image library. The residual doubt is that the snippet doesn't show the declarations of the two colliding identifiers, so a real homoglyph shadowing can't be ruled out from this excerpt alone.
Reproduce This Scan
Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
|
&&