Vulnerabilities in pkg:maven/org.apache.pdfbox/pdfbox

PACKAGE
Advisory Identifier: GHSA-j2xq-pfff-mvgg
Advisory Summary

CVE-2018-8036 is a MODERATE (CVSS 6.5) loop with unreachable exit condition vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Pdfbox libraries in the Maven ecosystem. The issue involves loop with unreachable exit condition in apache pdfbox. Remediation is available by upgrading affected packages to version 1.8.15, 2.0.11.

8 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.pdfbox/pdfbox

8 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.pdfbox/pdfbox. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j2xq-pfff-mvgg CVE-2018-8036 MODERATE Loop with Unreachable Exit Condition in Apache PDFBox
GHSA-gx96-vgf7-hwfg CVE-2018-11797 MODERATE In Apache PDFBox a carefully crafted PDF file can trigger an extremely long running computation
GHSA-fg3j-q579-v8x4 CVE-2021-31811 MODERATE Uncontrolled memory consumption
GHSA-7grw-6pjh-jpc9 CVE-2021-31812 MODERATE Infinite Loop in Apache PDFBox
GHSA-6vqp-h455-42mr CVE-2021-27906 MODERATE Uncontrolled Memory Allocation in Apache PDFBox
GHSA-2h3j-m7gr-25xj CVE-2021-27807 MODERATE Excessive Iteration Denial of Service in Apache PDFBox
GHSA-4c32-xmgj-2g98 CVE-2016-2175 HIGH High severity vulnerability that affects org.apache.pdfbox:pdfbox
GHSA-c9jj-3wvg-q65h CVE-2019-0228 CRITICAL Vulnerability that affects org.apache.pdfbox:pdfbox

CVE-2018-8036 at a Glance

CVE Identifier CVE-2018-8036
GHSA Identifier GHSA-j2xq-pfff-mvgg
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Pdfbox
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2018-8036

To remediate this vulnerability, upgrade all affected Pdfbox dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.pdfbox:pdfbox fixed: 1.8.15
<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox</artifactId>
    <version>1.8.15</version>
</dependency>
org.apache.pdfbox:pdfbox fixed: 2.0.11
<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox</artifactId>
    <version>2.0.11</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.pdfbox

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2018-8036, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.pdfbox

Analyze the terminal output to locate any version of Pdfbox in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.15), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.pdfbox command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Pdfbox, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In Apache PDFBox 1.8.0 to 1.8.14 and 2.0.0RC1 to 2.0.10, a carefully crafted (or fuzzed) file can trigger an infinite loop which leads to an out of memory exception in Apache PDFBox's AFMParser.

CVE-2018-8036 Affected Pdfbox Versions

2 component(s)
Fixed Versions:
1.8.152.0.11
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.pdfbox:pdfbox
Maven
≥ 1.8.0
< 1.8.15
1.8.15
org.apache.pdfbox:pdfbox
Maven
≥ 2.0.0RC1
< 2.0.11
2.0.11

References

Frequently Asked Questions

What is CVE-2018-8036?
CVE-2018-8036 is a security vulnerability in Pdfbox involving Loop with Unreachable Exit Condition in Apache PDFBox under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Pdfbox versions are affected?
Affected versions include releases prior to 1.8.15, 2.0.11 across affected packages: org.apache.pdfbox:pdfbox.
What version fixes CVE-2018-8036?
Upgrading to 1.8.15, 2.0.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pdfbox affected?
Yes, org.apache.pdfbox:pdfbox is affected in releases prior to 1.8.15, 2.0.11. Upgrade your dependency to 1.8.15, 2.0.11 or later.
What is the CVSS score of CVE-2018-8036?
CVE-2018-8036 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2018-8036?
CVE-2018-8036 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Maven dependencies for CVE-2018-8036?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.pdfbox'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j2xq-pfff-mvgg",
  "modified" : "2022-06-29T18:54:14Z",
  "published" : "2022-05-13T01:53:29Z",
  "aliases" : [ "CVE-2018-8036" ],
  "summary" : "Loop with Unreachable Exit Condition in Apache PDFBox",
  "details" : "In Apache PDFBox 1.8.0 to 1.8.14 and 2.0.0RC1 to 2.0.10, a carefully crafted (or fuzzed) file can trigger an infinite loop which leads to an out of memory exception in Apache PDFBox's AFMParser.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pdfbox:pdfbox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8.0"
      }, {
        "fixed" : "1.8.15"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.8.14"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pdfbox:pdfbox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0RC1"
      }, {
        "fixed" : "2.0.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.10"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-8036"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2669"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/9f62f742fd4fcd81654a9533b8a71349b064250840592bcd502dcfb6@%3Cusers.pdfbox.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r43491b25b2e5c368c34b106a82eff910a5cea3e90de82ad75cc16540@%3Cdev.syncope.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HKVPTJWZGUB4MH4AAOWMRJHRDBYFHGJ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/POPOGHJ5CVMUVCRQU7APBAN5IVZGZFDX"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-29T18:54:14Z",
    "nvd_published_at" : "2018-07-03T20:29:00Z"
  }
}