Vulnerability · Published Jun 12, 2021 · Assigned by apache

CVE-2021-31811A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading a tiny file

Medium 5.5

In plain English

A medium-severity security flaw in Apache PDFBox from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.6% (higher than 89% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)3.6%top 10.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In Apache PDFBox, a carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12libpdfbox-javano fix listedDEBIAN-CVE-2021-31811
Debian:13libpdfbox-javano fix listedDEBIAN-CVE-2021-31811
Debian:14libpdfbox-javano fix listedDEBIAN-CVE-2021-31811
Debian:12libpdfbox2-java2.0.24-1DEBIAN-CVE-2021-31811
Debian:13libpdfbox2-java2.0.24-1DEBIAN-CVE-2021-31811
Debian:14libpdfbox2-java2.0.24-1DEBIAN-CVE-2021-31811
Mavenorg.apache.pdfbox:pdfbox2.0.24GHSA-fg3j-q579-v8x4
Mavenorg.apache.pdfbox:pdfbox-parent2.0.24GHSA-fg3j-q579-v8x4
Ubuntu:22.04:LTSlibpdfbox-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:24.04:LTSlibpdfbox-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:25.10libpdfbox-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:26.04:LTSlibpdfbox-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:26.10libpdfbox-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:22.04:LTSlibpdfbox2-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:24.04:LTSlibpdfbox2-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:25.10libpdfbox2-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:26.04:LTSlibpdfbox2-javano fix listedUBUNTU-CVE-2021-31811
Ubuntu:26.10libpdfbox2-javano fix listedUBUNTU-CVE-2021-31811

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache PDFBox Apache PDFBox – before 2.0.24

Weakness: CWE-789

References