Security mailing lists by PureSourceCode

CVE-2023-36464

MEDIUM 5.5CVSS 3.1

pypdf and PyPDF2 possible Infinite Loop when a comment isn't followed by a character

pypdf is an open source, pure-python PDF library. In affected versions an attacker may craft a PDF which leads to an infinite loop if __parse_content_stream is executed. That is, for example, the case if the user extracted text from such a PDF. This issue was introduced in pull request #969 and resolved in pull request #1828. Users are advised to upgrade. Users unable to upgrade may modify the line while peek not in (b"\r", b"\n") in pypdf/generic/_data_structures.py to while peek not in (b"\r", b"\n", b"").

Published
27 Jun 2023
Last modified
2 Nov 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-835
Also known as
GHSA-4vvm-4w3v-6mr8PYSEC-2026-1835PYSEC-2026-3008
Sources
NVDJSONOSV GHSA-4vvm-4w3v-6mr8JSONOSV PYSEC-2026-1835JSONOSV PYSEC-2026-3008JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV GitHub CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV PyPA CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD py-pdf pypdf
cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
< 3.9.0 3.9.0
NVD pypdf2_project pypdf2
cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:*
>= 2.2.0
OSV PyPI pypdf >= 3.1.0, < 3.9.0 3.9.0
OSV PyPI pypdf2 >= 2.2.0, <= 3.0.1
OSV PyPI pypdf2 >= 2.2.0, < 3.9.0 3.9.0

References

History

  • 25 Nov 2026 20:36 UTC · NVD: first stored (published 27 Jun 2023)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 30 Jun 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.