# CVE-2026-26830: pdf-image has an OS Command Injection Vulnerability through its pdfFilePath parameter

> Attackers can execute arbitrary OS commands by manipulating the pdfFilePath parameter in the pdf-image npm package.

- **Severity:** Critical 9.8 (`CVSS:3.1/AC:L/AV:N/A:H/C:H/I:H/PR:N/S:U/UI:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 25 Mar 2026
- **Updated:** 27 Mar 2026
- **Also known as:** GHSA-q5mh-72xg-628w

## What is CVE-2026-26830?

CVE-2026-26830 is a critical command injection vulnerability in n/a, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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()

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2026-26830?

2 open source packages ship an affected version, including pdf-image. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pdf-image` | npm | All versions to 2.0.0 | None |
| `pdf-image` | npm | All versions to 2.0.0 | None |

Products: Pdf-Image Project Pdf-Image.

## How do I fix CVE-2026-26830?

No fix has been published for CVE-2026-26830 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-26830 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26830 exists.

Public exploit code:

- Directory page for CVE-2026-26830 through CVE-2026-26833 advisories (github_poc): https://github.com/zebbernCVE/npm-cve-2026-26830-26833
- Advisory for pdf-image ⌯⌲ 10 000 weekly downloads (github_poc): https://github.com/zebbernCVE/CVE-2026-26830

## Other vulnerabilities in n/a

- [CVE-2020-8132](https://insights.sbomify.com/CVE-2020-8132/): Improper Input Validation and Code Injection in pdf-image (critical 9.8)
- [CVE-2018-3757](https://insights.sbomify.com/CVE-2018-3757/): Command Injection in pdf-image (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-26830 and fix it if it is affected.

What it is: CVE-2026-26830 is a critical command injection vulnerability in n/a, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26830 exists.

Affected packages and fixed versions:
- pdf-image (npm): affected all versions up to 2.0.0; no fix listed
- pdf-image (npm): affected all versions up to 2.0.0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-26830/ (Markdown: https://insights.sbomify.com/CVE-2026-26830/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-26830
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-26830
- OSV: https://osv.dev/vulnerability/CVE-2026-26830

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-26830/
Summaries are generated and may contain mistakes; the official description above is the record.
