Skip to content

Denial Of Service when opening a corrupt PDF file

Moderate
michaelrsweet published GHSA-68x8-9phf-j7jf Mar 20, 2023

Package

No package listed

Affected versions

<= v1.1.0

Patched versions

None

Description

Summary

Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.
A DOS exists in the pdfio parser. crafted pdf files can cause the program to run at 100% utilization and never terminate.

This is different from CVE-2023-24808

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.
./pdfiototext pdfiototext-dos2.pdf > test.txt will recreate this vulnerability (i will include a URL for the file download).
The underlying pdfiototext library is vulnerable, not just the pdfiototext executable.
This was discovered by fuzzing, i am unsure exactly what portion of the code is responsible

PoC

Complete instructions, including specific configuration details, to reproduce the vulnerability.
I am unable to attach the pdf which causes this behavior directly to this report. I am providing a download URL and the file hash. If you would like me to submit the pdf in another way, please let me know.
pdfiototext-dos2.pdf

$ curl https://files.catbox.moe/8oy3rr.pdf > pdfiototext-dos2.pdf && shasum -a 256 pdfiototext-dos2.pdf
821710518f8217d3961ebe24d9c40bbb69365a8d1c6ee1ef83ac7facc677aff6  pdfiototexst-dos2.pdf

$ ./pdfiototext pdfiototext-dos2.pdf

Impact

What kind of vulnerability is it? Who is impacted?
Anyone who uses this library either as a standalone binary or as a library can be DOSed when attempting to parse this type of file. Web servers or other automated processes which rely on this code to turn pdf submissions into plaintext can be DOSed when an attacker uploads the pdf.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVE ID

CVE-2023-28428

Weaknesses

Credits