Skip to content

← Public intelligence

PyPI package

pypdf

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

68 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 4.6PyPIAmendedPublished

    pypdf: Possible infinite loop during recovery attempts in DictionaryObject.read_from_stream

    CVE-2026-33699 · GHSA-87mj-5ggw-8qc3

    Affected
    • PyPI pypdf < 6.9.2
    Fixed in
    6.9.2· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading a file in non-strict mode. Patches This has been fixed in pypdf==6.9.2. Workarounds If users cannot upgrade yet, consider applying the changes from PR #3693.

    Recommended action: Upgrade to 6.9.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 5.1PyPIAmendedPublished

    pypdf has inefficient decoding of array-based streams

    CVE-2026-33123 · GHSA-qpxp-75px-xjcp

    Affected
    • PyPI pypdf < 6.9.1
    Fixed in
    6.9.1· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to long runtimes and/or large memory usage. This requires accessing an array-based stream with lots of entries. Patches This has been fixed in pypdf==6.9.1. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3686.

    Recommended action: Upgrade to 6.9.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 6.8PyPIAmendedPublished

    pypdf: manipulated stream length values can exhaust RAM

    CVE-2026-31826 · GHSA-hqmh-ppp3-xvm7

    Affected
    • PyPI pypdf < 6.8.0
    Fixed in
    6.8.0· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing a content stream with a rather large /Length value, regardless of the actual data length inside the stream. Patches This has been fixed in pypdf==6.8.0. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3675. As far as we are aware, this mostly affects reading from buffers of unknown size, as returned by open("file.pdf", mode="rb") for example. Passing a file path or a BytesIO buffer to pypdf instead does not seem to trigger the vulnerability.

    Recommended action: Upgrade to 6.8.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. Medium, CVSS 6.9PyPIAmendedPublished

    pypdf vulnerable to inefficient decoding of ASCIIHexDecode streams

    CVE-2026-28804 · GHSA-9m86-7pmv-2852

    Affected
    • PyPI pypdf < 6.7.5
    Fixed in
    6.7.5· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires accessing a stream which uses the /ASCIIHexDecode filter. Patches This has been fixed in pypdf==6.7.5. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3666.

    Recommended action: Upgrade to 6.7.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. Medium, CVSS 6.9PyPIAmendedPublished

    pypdf: Manipulated RunLengthDecode streams can exhaust RAM

    CVE-2026-28351 · GHSA-f2v5-7jq9-h8cg

    Affected
    • PyPI pypdf < 6.7.4
    Fixed in
    6.7.4· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing the content stream using the RunLengthDecode filter. Patches This has been fixed in pypdf==6.7.4. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3664.

    Recommended action: Upgrade to 6.7.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 6.6PyPIAmendedPublished

    pypdf: Manipulated FlateDecode XFA streams can exhaust RAM

    CVE-2026-27888 · GHSA-x7hp-r3qg-r3cj

    Affected
    • PyPI pypdf < 6.7.3
    Fixed in
    6.7.3· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires accessing the xfa property of a reader or writer and the corresponding stream being compressed using /FlateDecode. Patches This has been fixed in pypdf==6.7.3. Workarounds If projects cannot upgrade yet, consider applying the changes from PR #3658.

    Recommended action: Upgrade to 6.7.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Low, CVSS 1.2PyPIAmendedPublished

    pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams

    CVE-2026-27628 · GHSA-2rw7-x74f-jg35

    Affected
    • PyPI pypdf < 6.7.2
    Fixed in
    6.7.2· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading the file. Patches This has been fixed in pypdf==6.7.2. Workarounds If users cannot upgrade yet, consider applying the changes from PR #3655.

    Recommended action: Upgrade to 6.7.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. Medium, CVSS 6.9PyPIAmendedPublished

    pypdf possibly has long runtimes for malformed FlateDecode streams

    CVE-2026-27026 · GHSA-9mvc-8737-8j8h

    Affected
    • PyPI pypdf < 6.7.1
    Fixed in
    6.7.1· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires a malformed /FlateDecode stream, where the byte-by-byte decompression is used. Patches This has been fixed in pypdf==6.7.1. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3644.

    Recommended action: Upgrade to 6.7.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  9. Medium, CVSS 6.9PyPIAmendedPublished

    pypdf has possible long runtimes/large memory usage for large /ToUnicode streams

    CVE-2026-27025 · GHSA-wgvp-vg3v-2xq3

    Affected
    • PyPI pypdf < 6.7.1
    Fixed in
    6.7.1· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to long runtimes and large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction. Patches This has been fixed in pypdf==6.7.1. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3646.

    Recommended action: Upgrade to 6.7.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. Medium, CVSS 6.9PyPIAmendedPublished

    pypdf has a possible infinite loop when processing TreeObject

    CVE-2026-27024 · GHSA-996q-pr4m-cvgq

    Affected
    • PyPI pypdf < 6.7.1
    Fixed in
    6.7.1· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires accessing the children of a TreeObject, for example as part of outlines. Patches This has been fixed in pypdf==6.7.1. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3645.

    Recommended action: Upgrade to 6.7.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  11. Medium, CVSS 5.1PyPIAmendedPublished

    pypdf has possible Infinite Loop when processing outlines/bookmarks

    CVE-2026-24688 · GHSA-2q4j-m29v-hq73

    Affected
    • PyPI pypdf < 6.6.2
    Fixed in
    6.6.2· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires accessing the outlines/bookmarks. Patches This has been fixed in pypdf 6.6.2. Workarounds If projects cannot upgrade yet, consider applying the changes from PR #3610.

    Recommended action: Upgrade to 6.6.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. Low, CVSS 2.7PyPIAmendedPublished

    pypdf has possible long runtimes for malformed startxref

    CVE-2026-22691 · GHSA-4f6g-68pf-7vhv

    Affected
    • PyPI pypdf < 6.6.0
    Fixed in
    6.6.0· Vendor fix available
    Issue
    Impact An attacker who exploits this vulnerability can craft a PDF which leads to possibly long runtimes for invalid startxref entries. When rebuilding the cross-reference table, PDF files with lots of whitespace characters become problematic. Only the non-strict reading mode is affected. Patches This has been fixed in pypdf==6.6.0. Workarounds Resources This issue has been fixed in #3594.

    Recommended action: Upgrade to 6.6.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. Low, CVSS 2.7PyPIAmendedPublished

    pypdf has possible long runtimes for missing /Root object with large /Size values

    CVE-2026-22690 · GHSA-4xc4-762w-m6cg

    Affected
    • PyPI pypdf < 6.6.0
    Fixed in
    6.6.0· Vendor fix available
    Issue
    Impact An attacker who exploits this vulnerability can craft a PDF which leads to possibly long runtimes for actually invalid files. This can be achieved by omitting the /Root entry in the trailer, while using a rather large /Size value. Only the non-strict reading mode is affected. Patches This has been fixed in pypdf==6.6.0. Workarounds Resources This issue has been fixed in #3594.

    Recommended action: Upgrade to 6.6.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  14. Medium, CVSS 6.6PyPIAmendedPublished

    pypdf's LZWDecode streams be manipulated to exhaust RAM

    CVE-2025-66019 · GHSA-m449-cwjh-6pw7

    Affected
    • PyPI pypdf < 6.4.0
    Fixed in
    6.4.0· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to a memory usage of up to 1 GB per stream. This requires parsing the content stream of a page using the LZWDecode filter. This is a follow up to GHSA-jfx9-29x2-rv3j to align the default limit with the one for zlib. Patches This has been fixed in pypdf==6.4.0. Workarounds If users cannot upgrade yet, use the line below to overwrite the default in their code:

    Recommended action: Upgrade to 6.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  15. Medium, CVSS 6.6PyPIAmendedPublished

    pypdf can exhaust RAM via manipulated LZWDecode streams

    CVE-2025-62708 · GHSA-jfx9-29x2-rv3j

    Affected
    • PyPI pypdf < 6.1.3
    Fixed in
    6.1.3· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing the content stream of a page using the LZWDecode filter. Patches This has been fixed in pypdf==6.1.3. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3502.

    Recommended action: Upgrade to 6.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  16. Medium, CVSS 6.6PyPIAmendedPublished

    pypdf possibly loops infinitely when reading DCT inline images without EOF marker

    CVE-2025-62707 · GHSA-vr63-x8vc-m265

    Affected
    • PyPI pypdf < 6.1.3
    Fixed in
    6.1.3· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires parsing the content stream of a page which has an inline image using the DCTDecode filter. Patches This has been fixed in pypdf==6.1.3. Workarounds If you cannot upgrade yet, consider applying the changes from PR #3501.

    Recommended action: Upgrade to 6.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  17. Medium, CVSS 6.6PyPIAmendedPublished

    PyPDF's Manipulated FlateDecode streams can exhaust RAM

    CVE-2025-55197 · GHSA-7hfw-26vp-jp8m

    Affected
    • PyPI pypdf < 6.0.0
    Fixed in
    6.0.0· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires just reading the file if a series of FlateDecode filters is used on a malicious cross-reference stream. Other content streams are affected on explicit access. Patches This has been fixed in pypdf==6.0.0. Workarounds If you cannot upgrade yet, you might want to implement the workaround for pypdf.filters.decompress yourself: https://github.com/py-pdf/pypdf/blob/0dd57738bbdcdb63f0fb43d8a6b3d222b6946595/pypdf/filters.py#L72-L143 References This issue has been reported in #3429 and fixed in #3430.

    Recommended action: Upgrade to 6.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  18. Medium, CVSS 5.1PyPIAmendedPublished

    Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF

    CVE-2023-46250 · GHSA-wjcc-cq79-p63f

    Affected
    • PyPI pypdf >= 3.7.0, < 3.17.0
    Fixed in
    3.17.0· Vendor fix available
    Issue
    Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This infinite loop blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage. That is, for example, the case when the pypdf-user manipulates an incoming malicious PDF e.g. by merging it with another PDF or by adding annotations. Patches The issue was fixed with #2264 Workarounds If you cannot update your version of pypdf, you should modify pypdf/generic/datastructures.py just like #2264 did.

    Recommended action: Upgrade to 3.17.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →