CVE-2021-27906
A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file
Check your servers for CVE-2021-27906
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-27906 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file. This issue affects Apache PDFBox version 2.0.22 and prior 2.0.x versions.
Exploitation
EPSS 3.34%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 88.9% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-789 Memory Allocation with Excessive Size Value
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Apache PDFBox |
affected from Apache PDFBox up to and including 2.0.22
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-27906 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-27906RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-27906Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-27906
trivy image --scanners vuln IMAGE | grep CVE-2021-27906
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- FEDORA-2021-93469e0030 lists.fedoraproject.org · vendor advisory
- FEDORA-2021-8b17a2725e lists.fedoraproject.org · vendor advisory
- FEDORA-2021-dc83ae690a lists.fedoraproject.org · vendor advisory
Other references
- https://lists.apache.org/thread.html/rf35026148ccc0e1af133501c0d003d052883fcc65107b3ff5d3b61cd%40%3Cusers.pdfbox.apache.org%3E lists.apache.org · mailing list
- [oss-security] 20210319 CVE-2021-27906: Apache PDFBox: A carefully crafted PDF file can trigger an… openwall.com · mailing list
- [announce] 20210320 CVE-2021-27906: Apache PDFBox: a carefully crafted PDF file can trigger an OutOfMemory-Exception… lists.apache.org · mailing list
- [pdfbox-users] 20210320 CVE-2021-27906: Apache PDFBox: a carefully crafted PDF file can trigger an… lists.apache.org · mailing list
- [ofbiz-commits] 20210321 [ofbiz-framework] branch trunk updated: Fixed: Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [ofbiz-notifications] 20210321 [jira] [Created] (OFBIZ-12205) Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [ofbiz-notifications] 20210321 [jira] [Commented] (OFBIZ-12205) Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [ofbiz-notifications] 20210321 [jira] [Updated] (OFBIZ-12205) Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [ofbiz-commits] 20210321 [ofbiz-framework] branch release17.12 updated: Fixed: Upgrade Apache PDFBox to 2.0.23… lists.apache.org · mailing list
- [ofbiz-notifications] 20210321 [jira] [Closed] (OFBIZ-12205) Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [ofbiz-commits] 20210321 [ofbiz-framework] branch release18.12 updated: Fixed: Upgrade Apache PDFBox to 2.0.23… lists.apache.org · mailing list
- [pdfbox-dev] 20210322 OSS-Fuzz integration lists.apache.org · mailing list
6 more
- [ofbiz-notifications] 20210405 [jira] [Updated] (OFBIZ-12205) Upgrade Apache PDFBox to 2.0.23 because of… lists.apache.org · mailing list
- [james-notifications] 20210501 [GitHub] [james-project] chibenwa opened a new pull request #414: [UPGRADE] Adopt… lists.apache.org · mailing list
- [pdfbox-dev] 20210518 CVE's lists.apache.org · mailing list
- https://www.oracle.com//security-alerts/cpujul2021.html oracle.com
- https://www.oracle.com/security-alerts/cpuoct2021.html oracle.com
- https://www.oracle.com/security-alerts/cpuapr2022.html oracle.com
Source: the record CVE-2021-27906 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse