/

CVE-2026-33437

Severity:

HIGH RISK

(8.1)

Stored XSS (CWE-79) in Stirling-PDF Get Info Workflow

CVE-2026-33437

Awaiting Analysis

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting and Browser Session Compromise

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Stirling-PDF may render untrusted PDF Title and Author metadata with innerHTML in the Get Info workflow, allowing malicious metadata to become stored cross-site scripting in the application page.

When a user opens the affected workflow and clicks Get Info on a crafted PDF, injected script may access browser-session data or alter displayed page content.

Affected context

The issue occurs in Stirling-PDF deployments using the Get Info workflow before the relevant security fix, where PDF metadata is inserted into the summary-text element through an HTML-interpreting sink. Risk depends on whether an attacker can supply or cause a user to process a PDF containing crafted Title or Author metadata and whether the resulting page is viewed in an authenticated browser session.

Exploit preconditions

  • Attack surface: The Get Info PDF-processing workflow in the web application
  • Required access: Ability to provide, upload, or otherwise cause processing of a PDF containing malicious metadata
  • Trigger point: A user clicks Get Info and the application renders the PDF Title or Author in the summary page
  • Why exploitation is possible: Untrusted metadata reaches innerHTML without adequate context-sensitive output encoding, allowing browser interpretation as active markup or script

Why this happens

The underlying bug is an unsafe output-rendering pattern in which PDF metadata is treated as trusted HTML. Assigning untrusted values to innerHTML allows attacker-controlled markup to be interpreted by the browser instead of displayed as text.

This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), specifically a stored or persistence-assisted XSS condition where attacker-controlled content is rendered in a later browser interaction.

Potential impact

  • An attacker may execute JavaScript in the context of the Stirling-PDF application
  • The script could access browser-readable session data or other exposed application information
  • The attacker could modify page content or alter user-visible workflow results
  • The vulnerability could enable unauthorized actions permitted by the victim's active session
  • A malicious document could affect multiple users if it is shared or processed repeatedly

General mitigation guidance

Mitigation generally focuses on treating all document metadata as untrusted and preventing it from entering HTML interpretation contexts.

Common defensive patterns include:

  • Render metadata through text-only APIs such as textContent or equivalent templating mechanisms
  • Apply context-aware output encoding when values must appear in HTML
  • Avoid assigning untrusted data to innerHTML or other active-content sinks
  • Enforce a restrictive Content Security Policy as defense in depth
  • Limit session privileges and protect sensitive cookies with appropriate browser security attributes
  • Validate and sanitize document metadata according to its intended display format, without relying on validation alone as an XSS defense

How teams detect issues like this

Detection can include:

  • Static analysis rules identifying assignments of document-derived values to innerHTML, HTML template insertion, or similar browser sinks
  • Code review checks tracing PDF metadata from parsing APIs to rendered page elements
  • Tests using harmless HTML-like marker strings in Title and Author fields to verify that output remains text
  • Runtime monitoring for unexpected script execution, DOM changes, or unusual browser requests following document processing
  • Policy enforcement requiring safe DOM APIs and context-aware output encoding for untrusted data

Automated code review and web application security testing tools may help identify these patterns, but should be supplemented with data-flow review.

Sources

SourceLink
github.comgithub.com/Stirling-Tools/Stirling-PDF/releases/tag/v2.0.0
github.comgithub.com/Stirling-Tools/Stirling-PDF/security/advisories/GHSA-qc47-qgh9-xj63

Frequently asked

questions

Exploitation may be possible through a malicious PDF supplied to a remotely accessible Stirling-PDF instance, but a user generally must process the document and activate the affected Get Info workflow.

The attacker needs a way to provide or distribute a PDF containing crafted metadata. The victim's browser interaction and session context determine the resulting impact.

Treat PDF metadata as untrusted text and render it with text-only APIs or correctly encoded templating rather than inserting it through innerHTML.

Use secure output-encoding standards, prohibit unsafe HTML sinks for untrusted values, perform data-flow-focused code reviews, and include XSS regression tests for metadata and other document-derived content.

Find out what's already
exploitable in your codebase.