Pdf ImageApplication · Pdf Image Project

CVE-2026-26830

CRITICAL · 9.8 CVSS v3.1 Published 2026-03-25
Fix available
A fix is available. Upgrade to after 2.0.0 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
pdf-image (npm package) through version 2.0.0 allows OS command injection via the pdfFilePath parameter. The constructGetInfoCommand and constructConvertCommandForPage functions use util.format() to interpolate user-controlled file paths into shell command strings that are executed via child_process.exec()

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The pdf-image npm package versions up to 2.0.0 contain OS command injection vulnerabilities in the constructGetInfoCommand and constructConvertCommandForPage functions. These functions use util.format() to directly interpolate the user-controlled pdfFilePath parameter into shell command strings that are then executed via child_process.exec(), allowing attackers to inject arbitrary OS commands.

MitigationUpgrade to a patched version of pdf-image that implements proper input sanitization or uses child_process.spawn() with array arguments instead of shell string interpolation. Until a patch is available, validate and sanitize all file path inputs to remove shell metacharacters.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Pdf ImageApplication
Affected:<= 2.0.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if pdf-image package is installed
    Run 'npm list pdf-image' or check package.json dependencies to see if pdf-image is listed as a dependency
    Affected if pdf-image appears in the project's installed dependencies
  2. Check the installed pdf-image version
    Run 'npm list pdf-image' to see the installed version number, or check the version in package.json
    Affected if The version is 2.0.0 or lower (any version up to and including 2.0.0)
  3. Locate the vulnerable source file
    Find the pdf-image module in node_modules/pdf-image/lib/ or check the project's node_modules directory for the file containing constructGetInfoCommand and constructConvertCommandForPage functions
    Affected if The file exists and contains these function definitions using util.format() with pdfFilePath
  4. Verify child_process.exec usage with string interpolation
    Inspect the source code for patterns like util.format() or string concatenation inserting pdfFilePath into shell commands passed to child_process.exec()
    Affected if The code uses exec() with string commands that directly interpolate user-controlled file paths without sanitization
  5. Determine if pdf-file paths are user-controlled
    Trace the code path from user input (API endpoints, CLI arguments, file uploads) to the pdf-image functions to see if pdfFilePath originates from external sources
    Affected if User-supplied file paths flow to the constructGetInfoCommand or constructConvertCommandForPage functions without validation

Your environment is affected if pdf-image version 2.0.0 or lower is installed and user-controlled file paths can reach the vulnerable constructGetInfoCommand or constructConvertCommandForPage functions without sanitization.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 2.0.0
Interim mitigation

Upgrade to a patched version of pdf-image that implements proper input sanitization or uses child_process.spawn() with array arguments instead of shell string interpolation. Until a patch is available, validate and sanitize all file path inputs to remove shell metacharacters.

Recommended fix Moderate confidence

Latest version > 2.0.0 (check npm for current release)

  1. 1. Identify all usages of the pdf-image package in your project dependencies (check package.json files)
  2. 2. Run 'npm list pdf-image' to confirm the installed version
  3. 3. If using version <= 2.0.0, upgrade to the latest available version: npm install pdf-image@latest
  4. 4. Alternatively, consider migrating to a maintained alternative package such as pdf-poppler or pdf-lib if no fixed version exists
  5. 5. After upgrading, verify the application still functions correctly with test cases
Caveat Review changelog for any breaking changes between your current version and the new version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Pdf Image Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA4.0 h
22.0 hours of engineering $3,860
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,176.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-26830 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-26830 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data