CVE-2021-31811
Denial of Service (DoS) vulnerability in pdfbox (Maven)

Denial of Service (DoS) No known exploit

What is CVE-2021-31811 About?

This is a Denial of Service vulnerability in Apache PDFBox, where a specially crafted PDF file can trigger an OutOfMemory-Exception during loading. This leads to application crashes and service unavailability. Exploitation is relatively easy by providing a malicious PDF file.

Affected Software

  • org.apache.pdfbox:pdfbox
    • >2.0.0, <2.0.24
  • org.apache.pdfbox:pdfbox-parent
    • >2.0.0, <2.0.24

Technical Details

The Apache PDFBox library, specifically versions 2.0.23 and prior 2.0.x versions, is vulnerable to a Denial of Service (DoS) condition. A carefully crafted PDF file can exploit parsing inefficiencies or vulnerabilities related to memory allocation when loading the file. This could involve, for instance, maliciously structured PDF objects, deeply nested data structures, or excessively large metadata blocks designed to consume an inordinate amount of memory during the parsing and rendering process. When such a PDF is processed, it exhausts the available memory, triggering an OutOfMemory-Exception and causing the application using PDFBox to crash or become unresponsive, resulting in a denial of service.

What is the Impact of CVE-2021-31811?

Successful exploitation may allow attackers to crash the application processing PDF files, leading to a denial of service.

What is the Exploitability of CVE-2021-31811?

Exploitation is relatively easy, requiring only the ability to supply a malicious PDF file to an application that uses Apache PDFBox to process documents. No authentication is required if the application accepts untrusted PDF files. Privileges depend on the context of the application processing the PDF, but typically no elevated privileges are needed for the attacker. The attack can be remote, as a user could upload or provide a link to the malicious PDF. The primary condition is that the application must process untrusted PDF documents. Risk factors include publicly accessible services that process user-supplied PDF content without robust validation or resource limits.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2021-31811?

Available Upgrade Options

  • org.apache.pdfbox:pdfbox
    • >2.0.0, <2.0.24 → Upgrade to 2.0.24
  • org.apache.pdfbox:pdfbox-parent
    • >2.0.0, <2.0.24 → Upgrade to 2.0.24

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2021-31811?

Similar Vulnerabilities: CVE-2020-13956 , CVE-2022-38706 , CVE-2023-38604 , CVE-2022-31128 , CVE-2022-23746