CVE-2018-8036: Loop with Unreachable Exit Condition in Apache PDFBox

org.apache.pdfbox:pdfbox Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Moderate
6.5

CVE-2018-8036: Loop with Unreachable Exit Condition in Apache PDFBox. Affects org.apache.pdfbox:pdfbox across 2 version ranges.

>= 1.8.0, < 1.8.15 >= 2.0.0RC1, < 2.0.11

Fixed in 1.8.15 or 2.0.11, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2018-8036 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Apache PDFBox is an open-source Java library for working with PDF documents. It provides functionality for creating, manipulating, and extracting data from PDF files. The library is widely used in various applications and frameworks that deal with PDF documents. However, versions 1.8.0 to 1.8.14 and 2.0.0RC1 to 2.0.10 of Apache PDFBox are vulnerable to an issue that can lead to an infinite loop and an out of memory exception in the AFMParser component.

Vulnerability Detail

The vulnerability in Apache PDFBox arises from a flaw in the AFMParser component. By providing a carefully crafted or fuzzed file, an attacker can trigger an infinite loop with an unreachable exit condition. This can cause the application using Apache PDFBox to consume excessive memory resources, eventually leading to an out of memory exception. The impact of this vulnerability can range from denial of service to potential remote code execution if the application is not properly handling the out of memory exception.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.8.0, < 1.8.15 1.8.15
  • >= 2.0.0RC1, < 2.0.11 2.0.11

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of Apache PDFBox to mitigate the risk.

Conclusion

The vulnerability in Apache PDFBox can lead to an infinite loop and an out of memory exception. It is crucial to upgrade to the fixed version of Apache PDFBox to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.pdfbox:pdfbox →

Share this vulnerability

FAQ

Apache PDFBox is an open-source Java library for working with PDF documents. It provides functionality for creating, manipulating, and extracting data from PDF files.

Versions 1.8.0 to 1.8.14 and 2.0.0RC1 to 2.0.10 of Apache PDFBox are affected by this vulnerability.

The impact of this vulnerability can range from denial of service to potential remote code execution if the application is not properly handling the out of memory exception.

To fix this vulnerability, it is recommended to upgrade to a fixed version of Apache PDFBox. For versions 1.8.0 to 1.8.14, upgrade to version 1.8.15 or later. For versions 2.0.0RC1 to 2.0.10, upgrade to version 2.0.11 or later.

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of Apache PDFBox to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.pdfbox:pdfbox.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.8.0, < 1.8.15 1.8.15
  • >= 2.0.0RC1, < 2.0.11 2.0.11

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback