External risk intelligence

PDF::WebKit Argument Injection via Meta Tags

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2026-16770

This library is designed for document conversion, a function commonly implemented in web applications and APIs that process user-supplied HTML content. Because these systems frequently accept untrusted input to generate PDFs for external users, the vulnerable processing logic is often exposed to the public internet through these application endpoints.

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This vulnerability affects the PDF::WebKit library for Perl, which is used to convert HTML content into PDF documents. It allows an attacker to inject malicious arguments into the conversion process through specially crafted HTML. This could potentially enable unauthorized access to local files or modification of output paths, depending on how the library is integrated and used within applications.

  • Allows untrusted HTML to control PDF generation.
  • Matters if untrusted HTML is converted to PDFs.
  • Confirm if this library is in use.

Attack Path

How an attacker could exploit the issue

An attacker can exploit this vulnerability by tricking a system into processing a specially crafted HTML document. This document, when parsed by the vulnerable component, allows the attacker to inject arbitrary command-line options into the underlying PDF generation tool. These injected options can then be used to perform actions like reading sensitive local files or writing to arbitrary file paths.

  • Requires processing untrusted HTML.
  • Vulnerable component accepts meta tags as commands.
  • Risk of local file access or arbitrary writes.

Live Threat

Current exploitation, exposure, and threat context

When an application using PDF::WebKit processes untrusted HTML, an attacker could inject arguments into the wkhtmltopdf command. This could allow an attacker to influence the PDF generation process, potentially leading to the disclosure of local files or other sensitive information.

  • Local files or sensitive data.
  • Via crafted meta tags in HTML.
  • Arbitrary file access or data leakage.

Operational Fix

Recommended remediation, mitigation, and detection steps

The PDF::WebKit library's argument injection vulnerability means that applications processing untrusted HTML to generate PDFs are at risk. Application owners are likely responsible for identifying where this library is used and whether the HTML source is untrusted. The immediate first step is to confirm the presence of PDF::WebKit in your environment, assess if it handles untrusted input, and determine its business criticality to prioritize remediation efforts.

  • Application owners must confirm usage.
  • Verify if untrusted HTML is processed.
  • Plan remediation based on exposure.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is PDF::WebKit?

PDF::WebKit is a Perl library used to transform HTML content into PDF documents. It acts as a wrapper for wkhtmltopdf, a popular tool that renders HTML using the WebKit engine. Developers typically integrate this library into web applications or automated services that need to generate reports, invoices, or other documents from HTML templates.

How does CVE-2026-16770 cause argument injection?

This vulnerability stems from an issue known as Improper Neutralization of Argument Delimiters (CWE-88). The library scans HTML meta tags to configure the conversion process. Because it fails to validate these tags against an allow list, an attacker can insert custom meta tags that the library mistakenly treats as legitimate command-line instructions for the underlying PDF engine, allowing the document itself to dictate how it is processed.

Does my HTML input automatically trigger this flaw?

Not every instance of HTML processing is affected. The flaw is triggered specifically when the library parses untrusted HTML documents containing malicious meta tags. If your application only processes HTML from trusted, internal sources or strips out all meta tags before the library handles the document, the trigger path is significantly restricted.

Is my application at risk if it is internet-facing?

According to Halo Surface Signal, applications using this library are often exposed to the internet because document generation features frequently accept user-supplied content. If your application allows external users to submit HTML that is subsequently processed by PDF::WebKit, the system is likely reachable and at increased risk, as it provides a direct path for untrusted input to interact with the library.

What steps should I take if I use PDF::WebKit?

Begin by auditing your codebase to locate where PDF::WebKit is implemented and identifying all sources of the HTML it processes. Prioritize systems where the input comes from untrusted users. Assess whether these workflows can be modified to sanitize HTML input by removing all meta tags or by switching to a safer library that does not allow document-level command injection.

References