CVE-2019-0228: Pdfbox Pdfbox Vulnerability

CRITICAL
Advisory Identifier: GHSA-c9jj-3wvg-q65h
CVSS 9.8
CWE-611
Published
Advisory Summary

CVE-2019-0228 is a CRITICAL (CVSS 9.8) pdfbox vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Pdfbox libraries in the Maven ecosystem. The issue involves pdfbox. Remediation is available by upgrading affected packages to version 2.0.15.

CVE-2019-0228 at a Glance

CVE Identifier CVE-2019-0228
GHSA Identifier GHSA-c9jj-3wvg-q65h
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Pdfbox
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2019-0228

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: 2.0.15
<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox</artifactId>
    <version>2.0.15</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-2019-0228, 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 2.0.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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. 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

Apache PDFBox 2.0.14 does not properly initialize the XML parser, which allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted XFDF.

CVE-2019-0228 Affected Pdfbox Versions

1 component(s)
Fixed Versions:
2.0.15
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.pdfbox:pdfbox
Maven
≥ 2.0.14
< 2.0.15
2.0.15

References

NVD — CVE-2019-0228 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-0228
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-c9jj-3wvg-q65h
lists.apache.org/thread.html/1a37565... WEB
https://lists.apache.org/thread.html/1a3756557f8cb02790b7183ccf7665ae23f608a421c4f723113bca79@%3Cusers.pdfbox.apache.org%3E
lists.apache.org/thread.html/8a19bd6... WEB
https://lists.apache.org/thread.html/8a19bd6d43e359913341043c2a114f91f9e4ae170059539ad1f5673c@%3Ccommits.tika.apache.org%3E
lists.apache.org/thread.html/bc8db1b... WEB
https://lists.apache.org/thread.html/bc8db1bf459f1ad909da47350ed554ee745abe9f25f2b50cad4e06dd@%3Cserver-dev.james.apache.org%3E
lists.apache.org/thread.html/be86fcd... WEB
https://lists.apache.org/thread.html/be86fcd7cd423a3fe6b73a3cb9d7cac0b619d0deb99e6b5d172c98f4@%3Ccommits.tika.apache.org%3E
lists.apache.org/thread.html/r0a2141... WEB
https://lists.apache.org/thread.html/r0a2141abeddae66dd57025f1681c8425834062b7c0c7e0b1d830a95d@%3Cusers.pdfbox.apache.org%3E
lists.apache.org/thread.html/r32b810... WEB
https://lists.apache.org/thread.html/r32b8102392a174b17fd19509a9e76047f74852b77b7bf46af95e45a2@%3Cserver-dev.james.apache.org%3E
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HKVPTJWZGUB4MH4AAOWMRJHRDBYFHGJ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/POPOGHJ5CVMUVCRQU7APBAN5IVZGZFDX
Pdfbox Security Information SECURITY
https://www.oracle.com//security-alerts/cpujul2021.html
Pdfbox Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Pdfbox Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2020.html
Pdfbox Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html

Frequently Asked Questions

What is CVE-2019-0228?
CVE-2019-0228 is a security vulnerability in Pdfbox involving pdfbox under CWE-611: Improper Restriction of XML External Entity Reference.
Which Pdfbox versions are affected?
Affected versions include releases prior to 2.0.15 across affected packages: org.apache.pdfbox:pdfbox.
What version fixes CVE-2019-0228?
Upgrading to 2.0.15 (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 2.0.15. Upgrade your dependency to 2.0.15 or later.
What is the CVSS score of CVE-2019-0228?
CVE-2019-0228 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-0228?
CVE-2019-0228 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2019-0228?
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-c9jj-3wvg-q65h",
  "modified" : "2021-06-15T17:00:24Z",
  "published" : "2019-07-05T21:12:54Z",
  "aliases" : [ "CVE-2019-0228" ],
  "summary" : "Vulnerability that affects org.apache.pdfbox:pdfbox",
  "details" : "Apache PDFBox 2.0.14 does not properly initialize the XML parser, which allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted XFDF.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pdfbox:pdfbox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.14"
      }, {
        "fixed" : "2.0.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-0228"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-c9jj-3wvg-q65h"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/1a3756557f8cb02790b7183ccf7665ae23f608a421c4f723113bca79@%3Cusers.pdfbox.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/8a19bd6d43e359913341043c2a114f91f9e4ae170059539ad1f5673c@%3Ccommits.tika.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/bc8db1bf459f1ad909da47350ed554ee745abe9f25f2b50cad4e06dd@%3Cserver-dev.james.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/be86fcd7cd423a3fe6b73a3cb9d7cac0b619d0deb99e6b5d172c98f4@%3Ccommits.tika.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r0a2141abeddae66dd57025f1681c8425834062b7c0c7e0b1d830a95d@%3Cusers.pdfbox.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r32b8102392a174b17fd19509a9e76047f74852b77b7bf46af95e45a2@%3Cserver-dev.james.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/cpujul2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:30:58Z",
    "nvd_published_at" : "2019-04-17T15:29:00Z"
  }
}