/

CVE-2026-22200

Severity:

HIGH RISK

(7.5)

Server-Side Injection in osTicket Ticket PDF Export

CVE-2026-22200

Analyzed

Vulnerability type

Category:

Server-Side Injection

CWE:

CWE-74

Impact:

Arbitrary File Read / Information Disclosure

Severity:

HIGH RISK

(7.5)

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

osTicket's ticket PDF export feature contains a server-side injection flaw where crafted rich-text HTML is passed to the mPDF engine without sufficient sanitization, allowing PHP filter expressions to be interpreted during PDF generation.

A remote attacker who can submit tickets and export them to PDF can abuse these filters to embed arbitrary local files from the server filesystem into the generated PDF, exposing sensitive data within the privileges of the osTicket application user.

Affected context

This vulnerability affects osTicket deployments that:

  • Allow guests to create tickets and view ticket status, or have user self-registration enabled
  • Support rich-text (HTML) content in ticket bodies or replies
  • Use the built-in ticket PDF export feature backed by mPDF

The issue manifests when user-supplied HTML is passed to mPDF in a way that allows PHP filter expressions or similar constructs to influence how remote or local resources are loaded during PDF generation.

Exploit preconditions

  • Attack surface: Public-facing ticket submission and ticket view endpoints that support PDF export.
  • Required access: Ability to:
  • Create or control ticket content (e.g., as a guest or registered user), and
  • Trigger PDF export for that ticket (e.g., from ticket status view or user portal).
  • Trigger point: Exporting a ticket containing crafted rich-text HTML to PDF, causing mPDF to process attacker-controlled resource references.
  • Why exploitation is possible: HTML content is insufficiently sanitized before being handed to mPDF, enabling injection of PHP filter or similar expressions that cause mPDF to read local files and embed their contents as images or other resources in the resulting PDF.

Why this happens

The core problem is inadequate sanitization of user-controlled HTML before it is consumed by a server-side rendering engine (mPDF).

mPDF supports a variety of resource loading and filter mechanisms, and when attacker-supplied HTML can influence those mechanisms, it creates a pathway for server-side injection.

Instead of strictly validating or normalizing URLs, resource references, and filter expressions, the implementation passes rich-text directly to mPDF, which interprets embedded expressions and allows access to local files.

This maps to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because special syntax intended for the PDF engine is introduced through untrusted input and executed in a privileged server-side context.

Potential impact

  • Disclosure of configuration files that may contain database credentials or API keys.
  • Exposure of application source code that can reveal additional vulnerabilities.
  • Leakage of log files, including potentially sensitive user data or internal paths.
  • Access to other readable files under the osTicket application user account, enabling further reconnaissance and targeted attacks.
  • Facilitation of subsequent compromise through credential reuse or knowledge of internal system details.

General mitigation guidance

Effective mitigation focuses on hardening the interface between user input and the PDF generation engine:

  • Restrict the allowed HTML subset for tickets to a minimal, well-understood set of tags and attributes, rejecting or stripping anything else.
  • Neutralize or remove constructs that can be interpreted as protocol handlers, filters, or file paths by downstream components (e.g., special URL schemes, filter expressions).
  • Use a robust HTML sanitizer or rich-text pipeline that performs allowlist-based validation rather than ad hoc blacklisting.
  • Treat all content passed into mPDF (or any HTML-to-PDF engine) as untrusted and normalize resource URLs, blocking access to local or non-HTTP(S) schemes.
  • Run the application and PDF renderer with least-privilege filesystem access, reducing which files are readable even if an injection occurs.
  • Consider separating the PDF generation process into an isolated service or container with constrained file and network access.

How teams detect issues like this

Detection can combine code-level review with runtime monitoring:

  • Static analysis and code review:
  • Identify all paths where user-supplied HTML or rich-text is passed to mPDF or similar PDF rendering libraries.
  • Flag use of raw HTML, unvalidated URLs, or filter-like constructs that are passed directly to downstream components.
  • Review sanitization and encoding logic to confirm allowlist-based filtering of tags, attributes, and URL schemes.
  • Policy and configuration checks:
  • Enforce internal guidelines that prohibit untrusted HTML from being rendered server-side without passing through vetted sanitizers.
  • Require explicit validation for any file path, stream wrapper, or filter syntax reachable from user input.
  • Runtime and log monitoring:
  • Monitor application and web server logs for unusual resource access patterns during PDF generation (e.g., attempts to access configuration files or non-standard paths).
  • Use security monitoring tools or WAF rules to detect and block payloads containing suspicious filter expressions or protocol handlers in ticket content.
  • Automated SAST/DAST tools can assist in flagging injection patterns into PDF generators and other rendering engines, but should be complemented with manual review for context.

Sources

SourceLink
github.comgithub.com/osTicket/osTicket/commit/c59b067
github.comgithub.com/osTicket/osTicket/releases/tag/v1.17.7
github.comgithub.com/osTicket/osTicket/releases/tag/v1.18.3
horizon3.aihorizon3.ai/attack-research/attack-blogs/ticket-to-shell-exploiting-php-filters-and-cnext-in-osticket-cve-2026-22200/
vulncheck.comvulncheck.com/advisories/osticket-pdf-export-arbitrary-file-read

Frequently asked

questions

Yes. In typical configurations where guests can open tickets and view their status or where user self-registration is enabled, a remote attacker can submit a crafted ticket and then trigger PDF export through the user interface.

The attacker generally only needs the ability to create or control ticket content and to access the relevant ticket's PDF export functionality. No administrative privileges are required if the portal allows public or self-registered users to export tickets they own.

The safest approach is to ensure that all user-supplied HTML is rigorously sanitized before being passed to mPDF, using an allowlist of safe tags, attributes, and URL schemes, and to block any constructs that could be interpreted as filters or local file references. Additionally, configure the rendering environment so that it cannot freely access sensitive local files.

Adopt a consistent pattern where any untrusted content destined for downstream engines (PDF renderers, template engines, shell commands, interpreters) is strictly validated, sanitized, and normalized. Combine allowlist-based input validation, principle-of-least-privilege for service accounts and file access, and security reviews focusing on data flows into third-party libraries to catch injection risks early in development.

Find out what's already
exploitable in your codebase.