Skip to content
Fencer Intel
medium 5.5

CVE-2021-31812 json

A carefully crafted PDF file can trigger an infinite loop while loading the file

published 5y ago modified 4mo ago also GHSA-7grw-6pjh-jpc9 , EUVD-2021-1279

cvss
5.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.1%
EPSS 3.1% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

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

Patch / fix

  • maven org.apache.pdfbox:pdfbox 2.0.24
  • maven org.apache.pdfbox:pdfbox-parent 2.0.24
  • Apache Software Foundation Apache PDFBox 2.0.24
  • libpdfbox2-java Debian 14, Debian 13, Debian 12 2.0.24-1

debian advisories DEBIAN-CVE-2021-31812

Is CVE-2021-31812 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-31812 updated cvss 5.5

pdfbox: infinite loop while loading a crafted PDF file

  • Red Hat BPM Suite 6 pdfbox pdfbox
    affected: no fix planned “Out of support scope”
  • Red Hat Fuse 7 pdfbox pdfbox
    affected: no fix available “Fix deferred”
  • Red Hat Integration Camel K 1 pdfbox pdfbox
    affected: no fix available
  • Red Hat JBoss BRMS 6 pdfbox pdfbox Red Hat JBoss Data Virtualization 6 pdfbox pdfbox Red Hat JBoss Fuse 6 pdfbox pdfbox Red Hat JBoss Fuse Service Works 6 pdfbox pdfbox
    affected: no fix planned “Out of support scope”
  • Red Hat Integration
    fixed: vendor fix RHSA-2021:4918

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.05% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P
GitHub 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
maven org.apache.pdfbox:pdfbox
>=2.0.0, <2.0.24
2.0.24
maven org.apache.pdfbox:pdfbox-parent
>=2.0.0, <2.0.24
2.0.24

Affected products

  • Apache Software Foundation Apache PDFBox

Classification

Weakness
  • CWE-834 Excessive Iteration
  • CWE-835 Loop with Unreachable Exit Condition

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.