PyPI / pypdf / 6.21.2

pypdf 6.21.2

Source
https://github.com/py-pdf/pypdf
Artifact scanned
pypdf-6.21.2-py3-none-any.whl (wheel · 398.2 KB · SHA-256 1d44d1a3a200…)
Compared with
pypdf-6.21.1-py3-none-any.whl (0 signals introduced since)
Files
59 scanned, 5 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 7 info
Scan time
8.0 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 7 of 7 warn and critical signals; 7 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 09:54

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review payload-bytes-literal pypdf/_encryption.py:117:5

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

    _PADDING = (
        b"\x28\xbf\x4e\x5e\x4e\x75\x8a\x41\x64\x00\x4e\x56\xff\xfa\x01\x08"
        b"\x2e\x2e\x00\xb6\xd0\x68\x3e\x80\x2f\x0c\xa9\xfe\x64\x53\x69\x7a"
    )
    likely benign LLM, confidence 0.97 Standard 32-byte PDF password padding constant used by the encryption code.
    Reasoning

    The 32 bytes are the standard PDF encryption padding string defined in the PDF specification (ISO 32000), used in RC4/AES key derivation. A fixed binary constant in a PDF encryption module is the expected shape, not a hidden payload.

  2. info warn → info by review encoding-hex pypdf/_encryption.py:117:7

    16 consecutive `\xNN` escapes (entropy 3.7 bits/byte) (raw pass, confidence 0.65)

    _PADDING = (
        b"\x28\xbf\x4e\x5e\x4e\x75\x8a\x41\x64\x00\x4e\x56\xff\xfa\x01\x08"
        b"\x2e\x2e\x00\xb6\xd0\x68\x3e\x80\x2f\x0c\xa9\xfe\x64\x53\x69\x7a"
    )
    dismissed LLM, confidence 0.95 Raw hex-escape match on the standard PDF padding constant.
    Reasoning

    This raw hex-escape finding is the same spec-defined PDF padding constant. The entropy is expected for a fixed cryptographic constant, and the raw pass has a high false-positive rate.

  3. info warn → info by review encoding-hex pypdf/_encryption.py:118:7

    16 consecutive `\xNN` escapes (entropy 3.9 bits/byte) (raw pass, confidence 0.65)

        b"\x28\xbf\x4e\x5e\x4e\x75\x8a\x41\x64\x00\x4e\x56\xff\xfa\x01\x08"
        b"\x2e\x2e\x00\xb6\xd0\x68\x3e\x80\x2f\x0c\xa9\xfe\x64\x53\x69\x7a"
    )
    dismissed LLM, confidence 0.95 Raw hex-escape match on the second half of the standard PDF padding constant.
    Reasoning

    This is the second half of the same PDF padding constant. It is a known specification value, and the raw pass flags it only because of its byte-escape shape.

  4. info warn → info by review dynamic-attribute pypdf/_page.py:2278:20

    reach-by-name through `locals` (ast pass, confidence 0.60)

                ):
                    if locals()[visitor]:
                        logger_warning(
                            "Argument %(visitor)s is ignored in layout mode",
    likely benign LLM, confidence 0.85 Checks a visitor function argument by name through locals() to warn in layout mode.
    Reasoning

    locals() is used to test whether a named visitor callback argument was supplied, which is a plain introspection idiom. It only reads local variables inside the same function and runs no attacker-controlled code.

  5. info warn → info by review decoder-decompress-payload pypdf/filters.py:95:20

    file imports decoder module(s) binascii, zlib, base64 and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

    def _decompress_with_limit(data: bytes) -> bytes:
        decompressor = zlib.decompressobj()
        configuration = get_configuration()
        result = decompressor.decompress(data, max_length=configuration.zlib_maximum_output_length)
    likely benign LLM, confidence 0.92 Bounded zlib decompression of PDF FlateDecode stream data.
    Reasoning

    zlib.decompressobj with max_length is the standard FlateDecode implementation for PDF streams. The output is bounded by a configured limit, which is a defensive choice, and decompressing PDF data is the library's purpose.

  6. info warn → info by review payload-bytes-literal pypdf/generic/_image_inline.py:195:13

    concatenated bytes literal contains 38 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

            elif c in (
                b"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc9\xca\xcb\xcc\xcd\xce\xcf"
                b"\xda\xdb\xdc\xdd\xde\xdf"
                b"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xfe"
    likely benign LLM, confidence 0.85 Byte-value lookup set used when parsing inline image data.
    Reasoning

    The concatenated bytes are a set of byte values used as a membership test in inline image parsing, which is a plain lookup table for recognizing characters. It is a legitimate constant set in a PDF image parser, not a payload.

  7. info warn → info by review encoding-hex pypdf/generic/_image_inline.py:197:15

    17 consecutive `\xNN` escapes (entropy 4.1 bits/byte) (raw pass, confidence 0.65)

                b"\xda\xdb\xdc\xdd\xde\xdf"
                b"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xfe"
            ):
                c = read(2)
    dismissed LLM, confidence 0.90 Raw hex-escape match on the inline image byte lookup table.
    Reasoning

    This raw hex-escape finding is the continuation of the same byte-value lookup set in the inline image parser. The escape pattern alone does not indicate malicious intent, and the raw pass is noisy.

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.

cargo install disclude --version 4.3.0
curl -fsSL -o pypdf-6.21.2-py3-none-any.whl https://files.pythonhosted.org/packages/1b/4d/c9d2d67f204eff463237a1a8f5e25a6923b7b1043982b91fcaf104c8ef60/pypdf-6.21.2-py3-none-any.whl
printf '%s  %s\n' 1d44d1a3a200f25062adff0085b02040e4646431ac2ccac22e42679e91466084 pypdf-6.21.2-py3-none-any.whl | shasum -a 256 -c -
unzip -q pypdf-6.21.2-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg