CVE-2021-31812
A carefully crafted PDF file can trigger an infinite loop while loading the file
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
5.5
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.
- Record
CVE-2021-31812- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:N/A:P - Weakness
- CWE-834, CWE-835
- Updated
- 2026-11-02
CVE List No score
A carefully crafted PDF file can trigger an infinite loop while loading the file
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.
- Record
CVE-2021-31812- Weakness
- CWE-834
- Updated
- 2026-11-02
EUVDEUVD-2021-1279 No score
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.
- Record
EUVD-2021-1279- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-7grw-6pjh-jpc9
5.5
Infinite Loop in Apache PDFBox
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.
- Record
GHSA-7grw-6pjh-jpc9- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-834, CWE-835
- Updated
- 2026-11-02
OSV
5.5
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.
- Record
CVE-2021-31812- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-31812
5.5
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.
- Record
DEBIAN-CVE-2021-31812- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-7grw-6pjh-jpc9
5.5
Infinite Loop in Apache PDFBox
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.
- Record
GHSA-7grw-6pjh-jpc9- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-834, CWE-835
- Updated
- 2026-11-02
OSVOESA-2021-1256
5.5
pdfbox security update
Apache PDFBox is an open source Java PDF library for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
Security Fix(es):
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.(CVE-2021-31811)
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.(CVE-2021-31812)
- Record
OESA-2021-1256- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-31812
5.5
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.
- Record
UBUNTU-CVE-2021-31812- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVMGASA-2021-0378 No score
Updated pdfbox packages fix security vulnerabilities
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 (CVE-2021-31811).
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 (CVE-2021-31812).
- Record
MGASA-2021-0378- Updated
- 2026-11-02
Affected products
- apache pdfbox
- apache software foundation pdfbox
- fedoraproject fedora
- oracle banking corporate lending process management
- oracle banking credit facilities process management
- oracle banking supply chain finance
- oracle communications messaging server
- oracle retail customer management and segmentation foundation
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.apache.pdfbox:pdfboxMaven |
2.0.0 up to 2.0.24 | 2.0.24 |
org.apache.pdfbox:pdfbox-parentMaven |
2.0.0 up to 2.0.24 | 2.0.24 |
libpdfbox-javaDebian:12 |
All versions, plus listed versions 1:1.8.16-21:1.8.16-31:1.8.16-41:1.8.16-51:1.8.17-1 |
None known |
libpdfbox-javaDebian:13 |
All versions, plus listed versions 1:1.8.16-51:1.8.17-1 |
None known |
libpdfbox-javaDebian:14 |
All versions, plus listed versions 1:1.8.16-51:1.8.17-1 |
None known |
libpdfbox2-javaDebian:12 |
before 2.0.24-1 | 2.0.24-1 |
libpdfbox2-javaDebian:13 |
before 2.0.24-1 | 2.0.24-1 |
libpdfbox2-javaDebian:14 |
before 2.0.24-1 | 2.0.24-1 |
org.apache.pdfbox:pdfboxMaven |
2.0.0 up to 2.0.24, plus listed versions 2.0.12.0.102.0.112.0.122.0.13 Show 18 moreShow less2.0.142.0.152.0.162.0.172.0.182.0.192.0.22.0.202.0.212.0.222.0.232.0.32.0.42.0.52.0.62.0.72.0.82.0.9 |
2.0.24 |
org.apache.pdfbox:pdfbox-parentMaven |
2.0.0 up to 2.0.24, plus listed versions 2.0.12.0.102.0.112.0.122.0.13 Show 18 moreShow less2.0.142.0.152.0.162.0.172.0.182.0.192.0.22.0.202.0.212.0.222.0.232.0.32.0.42.0.52.0.62.0.72.0.82.0.9 |
2.0.24 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
pdfboxMageia:8 From an advisory covering 2 CVEs |
before 2.0.24-1.mga8 | 2.0.24-1.mga8 |
pdfboxopenEuler:20.03-LTS-SP1 From an advisory covering 2 CVEs |
before 2.0.24-1.oe1 | 2.0.24-1.oe1 |
libpdfbox-javaUbuntu:16.04:LTS |
All versions, plus listed versions 1:1.8.7+dfsg-11:1.8.10-11:1.8.10-21:1.8.11+dfsg-1 |
None known |
libpdfbox-javaUbuntu:18.04:LTS |
All versions, plus listed versions 1:1.8.13-11:1.8.13-21:1.8.16-2~18.04 |
None known |
libpdfbox2-javaUbuntu:18.04:LTS |
All versions, plus listed versions 2.0.7-12.0.8-12.0.8-22.0.9-12.0.13-2~18.04 |
None known |
libpdfbox-javaUbuntu:20.04:LTS |
All versions, plus listed versions 1:1.8.16-2 |
None known |
libpdfbox2-javaUbuntu:20.04:LTS |
All versions, plus listed versions 2.0.16-12.0.17-12.0.18-1 |
None known |
libpdfbox-javaUbuntu:22.04:LTS |
All versions, plus listed versions 1:1.8.16-2 |
None known |
libpdfbox2-javaUbuntu:22.04:LTS |
All versions, plus listed versions 2.0.23-12.0.24-22.0.25-1 |
None known |
libpdfbox-javaUbuntu:24.04:LTS |
All versions, plus listed versions 1:1.8.16-41:1.8.16-5 |
None known |
libpdfbox2-javaUbuntu:24.04:LTS |
All versions, plus listed versions 2.0.27-22.0.29-1 |
None known |
libpdfbox-javaUbuntu:25.10 |
All versions, plus listed versions 1:1.8.16-5 |
None known |
libpdfbox2-javaUbuntu:25.10 |
All versions, plus listed versions 2.0.29-1 |
None known |
libpdfbox-javaUbuntu:26.10 |
All versions, plus listed versions 1:1.8.16-5 |
None known |
libpdfbox2-javaUbuntu:26.10 |
All versions, plus listed versions 2.0.29-1 |
None known |
libpdfbox-javaUbuntu:26.04:LTS |
All versions, plus listed versions 1:1.8.16-5 |
None known |
libpdfbox2-javaUbuntu:26.04:LTS |
All versions, plus listed versions 2.0.29-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-31812 is a medium vulnerability (CVSS 5.5) in Apache Pdfbox, published June 12, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.05%, the 87th percentile. Fixed in org.apache.pdfbox:pdfbox 2.0.24.
References
lists.apache.org/thread.html/ra2ab0ce69ce8aaff0773b8c1036438387ce004c2afc6f066626e205e%40%3Cusers.pdfbox.apache.org%3E
lists.apache.org/thread.html/rf251f6c358087107f8c23473468b279d59d50a75db6b4768165c78d3%40%3Cannounce.apache.org%3E
openwall.com/lists/oss-security/2021/06/12/1
lists.apache.org/thread.html/rfe26bcaba564deb505c32711ba68df7ec589797dcd96ff3389a8aaba%40%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/rd4b6db6c3b8ab3c70f1c3bbd725a40920896453ffc2744ade6afd9fb%40%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/r143fd8445e0e778f4a85187bd79438630b96b8040e9401751fdb8aea%40%3Ccommits.ofbiz.apache.org%3E
Show 31 moreShow less
lists.apache.org/thread.html/r179cc3b6822c167702ab35fe36093d5da4c99af44238c8a754c6860f%40%3Ccommits.ofbiz.apache.org%3E
lists.apache.org/thread.html/r2090789e4dcc2c87aacbd87d5f18e2d64dcb9f6eb7c47f5cf7d293cb%40%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/r132e9dbbe0ebdc08b39583d8be0a575fdba573d60a42d940228bceff%40%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/re0cacd3fb337cdf8469853913ed2b4ddd8f8bfc52ff0ddbe61c1dfba%40%3Ccommits.ofbiz.apache.org%3E
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7HHWJRFXZ3PTKLJCOM7WJEYZFKFWMNSV
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MDJKJQOMVFDFIDS27OQJXNOYHV2O273D
oracle.com/security-alerts/cpuoct2021.html
oracle.com/security-alerts/cpujan2022.html
oracle.com/security-alerts/cpuapr2022.html
oracle.com/security-alerts/cpujul2022.html
nvd.nist.gov/vuln/detail/CVE-2021-31812
lists.apache.org/thread.html/r132e9dbbe0ebdc08b39583d8be0a575fdba573d60a42d940228bceff@%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/r143fd8445e0e778f4a85187bd79438630b96b8040e9401751fdb8aea@%3Ccommits.ofbiz.apache.org%3E
lists.apache.org/thread.html/r179cc3b6822c167702ab35fe36093d5da4c99af44238c8a754c6860f@%3Ccommits.ofbiz.apache.org%3E
lists.apache.org/thread.html/r2090789e4dcc2c87aacbd87d5f18e2d64dcb9f6eb7c47f5cf7d293cb@%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/ra2ab0ce69ce8aaff0773b8c1036438387ce004c2afc6f066626e205e@%3Cusers.pdfbox.apache.org%3E
lists.apache.org/thread.html/rd4b6db6c3b8ab3c70f1c3bbd725a40920896453ffc2744ade6afd9fb@%3Cnotifications.ofbiz.apache.org%3E
lists.apache.org/thread.html/re0cacd3fb337cdf8469853913ed2b4ddd8f8bfc52ff0ddbe61c1dfba@%3Ccommits.ofbiz.apache.org%3E
lists.apache.org/thread.html/rf251f6c358087107f8c23473468b279d59d50a75db6b4768165c78d3@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/rfe26bcaba564deb505c32711ba68df7ec589797dcd96ff3389a8aaba@%3Cnotifications.ofbiz.apache.org%3E
lists.fedoraproject.org/archives/list/[email protected]/message/7HHWJRFXZ3PTKLJCOM7WJEYZFKFWMNSV
lists.fedoraproject.org/archives/list/[email protected]/message/MDJKJQOMVFDFIDS27OQJXNOYHV2O273D
github.com/advisories/GHSA-7grw-6pjh-jpc9
security-tracker.debian.org/tracker/CVE-2021-31812
advisories.mageia.org/MGASA-2021-0378.html
bugs.mageia.org/show_bug.cgi?id=29125
lists.fedoraproject.org/archives/list/[email protected]/thread/MDJKJQOMVFDFIDS27OQJXNOYHV2O273D
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1256
nvd.nist.gov/vuln/detail/CVE-2021-31811
ubuntu.com/security/CVE-2021-31812
cve.org/CVERecord?id=CVE-2021-31812