CVE-2020-8132: Improper Input Validation and Code Injection in pdf-image

pdf-image Updated 02 Oct 2025

Summary

10/05/2021
No i
High
9.8

CVE-2020-8132: Improper Input Validation and Code Injection in pdf-image. Affects pdf-image versions < 2.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The pdf-image npm package is a popular library used for extracting images from PDF files. It provides functionality to convert PDF pages into images. The package is widely used in various applications that require PDF processing. However, versions of pdf-image up to 2.0.0 are vulnerable to an improper input validation and code injection vulnerability.

Vulnerability Detail

The vulnerability arises due to a lack of input validation in the pdf-image npm package. If the PDF file path is constructed based on untrusted user input, an attacker can exploit this vulnerability to execute arbitrary code. This can lead to various malicious activities, such as remote code execution, unauthorized access, and data manipulation. The vulnerability has a severity score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The Common Weakness Enumeration (CWE) IDs associated with this vulnerability are CWE-20 (Improper Input Validation) and CWE-94 (Code Injection).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating the package is not immediately feasible, a temporary workaround is to avoid constructing file paths based on untrusted user input. Instead, use a predefined and trusted file path for PDF files. This can help mitigate the risk of code injection.

Conclusion

The pdf-image npm package up to version 2.0.0 is vulnerable to an improper input validation and code injection vulnerability. This can allow an attacker to execute arbitrary code, leading to severe consequences such as remote code execution and unauthorized access. It is crucial for developers to update the package to a secure version and implement proper input validation to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for pdf-image →

Share this vulnerability

FAQ

The vulnerability allows an attacker to execute arbitrary code, which can lead to remote code execution, unauthorized access, and data manipulation.

Versions of pdf-image up to 2.0.0 are affected by this vulnerability.

At the time of this report, there are no known public exploits for this vulnerability.

Yes, the vulnerability has been patched in versions of pdf-image higher than 2.0.0. It is recommended to update to the latest version to mitigate the risk.

Developers should update the pdf-image package to a version higher than 2.0.0. Additionally, they should implement proper input validation and sanitization techniques to prevent code injection vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for pdf-image.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback