Security mailing lists by PureSourceCode

CVE-2022-24859

MEDIUM 5.5CVSS 3.1

Manipulated inline images can cause Infinite Loop in PyPDF2

PyPDF2 is an open source python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In versions prior to 1.27.5 an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 if the code attempts to get the content stream. The reason is that the last while-loop in ContentStream._readInlineImage only terminates when it finds the EI token, but never actually checks if the stream has already ended. This issue has been resolved in version 1.27.5. Users unable to upgrade should validate and PDFs prior to iterating over their content stream.

Published
18 Apr 2022
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-835
Also known as
GHSA-xcjx-m2pj-8g79PYSEC-2022-194
Sources
NVDJSONOSV GHSA-xcjx-m2pj-8g79JSONOSV PYSEC-2022-194JSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
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
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
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD pypdf2_project pypdf2
cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:*
< 1.27.5 1.27.5
NVD debian debian_linux
cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
= 9.0
OSV PyPI pypdf2 < 1.27.5 1.27.5

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 18 Apr 2022)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 18 Apr 2022)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 22 Apr 2022)
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.