The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-50897

CVE-2022-50897: mPDF 7.0 Path Traversal Vulnerability

CVE-2022-50897 is a path traversal flaw in mPDF 7.0 that enables attackers to read arbitrary system files via manipulated annotation parameters. This article covers technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2022-50897 Overview

mPDF 7.0 contains a local file inclusion (LFI) vulnerability that allows attackers to read arbitrary system files by manipulating annotation file parameters. Attackers can generate URL-encoded or base64 payloads to include local files through crafted annotation content with file path specifications. This vulnerability is classified under CWE-98 (Improper Control of Filename for Include/Require Statement in PHP Program).

Critical Impact

Unauthenticated remote attackers can read sensitive system files such as /etc/passwd, configuration files containing credentials, and application source code through crafted PDF annotation parameters.

Affected Products

  • mPDF 7.0

Discovery Timeline

  • 2026-01-13 - CVE CVE-2022-50897 published to NVD
  • 2026-01-13 - Last updated in NVD database

Technical Details for CVE-2022-50897

Vulnerability Analysis

This local file inclusion vulnerability exists in mPDF version 7.0's handling of annotation file parameters. The library fails to properly sanitize user-supplied file paths when processing PDF annotations, allowing attackers to traverse directories and include arbitrary local files within the generated PDF output. The vulnerability can be exploited over the network without requiring authentication or user interaction, enabling attackers to exfiltrate sensitive information from the underlying server.

Root Cause

The root cause lies in improper input validation of file path specifications within mPDF's annotation processing functionality. The library does not adequately sanitize or restrict file paths provided through annotation parameters, failing to implement proper allowlists or path canonicalization. This allows attackers to use directory traversal sequences or encoded payloads to reference files outside intended directories.

Attack Vector

The attack is conducted over the network against web applications using the vulnerable mPDF library. An attacker crafts a malicious request containing specially formatted annotation content with file path specifications pointing to sensitive system files. The payload can be URL-encoded or base64-encoded to bypass basic input filters. When the application processes this input with mPDF, the library includes the contents of the specified local files in the generated PDF output, effectively disclosing arbitrary file contents to the attacker.

The vulnerability mechanism involves manipulation of annotation file parameters during PDF generation. Attackers craft payloads containing file path specifications (e.g., ../../../etc/passwd) within annotation content. Technical details and proof-of-concept examples are available in the Exploit-DB #50995 advisory.

Detection Methods for CVE-2022-50897

Indicators of Compromise

  • Unusual PDF generation requests containing directory traversal patterns such as ../ or encoded variants (%2e%2e%2f)
  • Server logs showing access attempts to sensitive files like /etc/passwd, /etc/shadow, or application configuration files
  • PDF outputs containing unexpected file contents or system information
  • Web application firewall logs indicating LFI attack patterns targeting mPDF endpoints

Detection Strategies

  • Deploy web application firewall rules to detect and block directory traversal patterns in request parameters
  • Implement log monitoring for file access attempts outside expected directories during PDF generation
  • Use intrusion detection systems configured to alert on LFI attack signatures
  • Monitor for anomalous PDF generation activity including unusual file sizes or processing times

Monitoring Recommendations

  • Enable detailed logging for all PDF generation operations including input parameters
  • Configure file integrity monitoring for sensitive system files and application configurations
  • Implement real-time alerting for detected traversal patterns in web application inputs
  • Review PDF generation logs periodically for suspicious file path patterns

How to Mitigate CVE-2022-50897

Immediate Actions Required

  • Upgrade mPDF to the latest patched version if available
  • Implement input validation to sanitize all user-supplied data before passing to mPDF
  • Deploy web application firewall rules to block LFI attack patterns
  • Restrict file system permissions for the web server user to limit accessible files

Patch Information

Organizations should consult the official mPDF Documentation for information on patched versions. Additionally, review the VulnCheck Advisory for specific remediation guidance. If no patch is available, implement the workarounds listed below until an official fix is released.

Workarounds

  • Implement strict input validation and sanitization for all user-controlled data passed to mPDF annotation functions
  • Use allowlist-based validation to restrict permitted file paths and reject any directory traversal sequences
  • Run the web application with minimal file system privileges to limit the impact of successful exploitation
  • Consider disabling annotation functionality if not required by your application
bash
# Example PHP input sanitization
# Validate and sanitize file paths before passing to mPDF
# Remove directory traversal sequences and validate against allowlist
# Implement in your application before calling mPDF methods

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechMpdf

  • SeverityHIGH

  • CVSS Score8.7

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-98
  • Technical References
  • MPDF Documentation

  • Exploit-DB #50995

  • VulnCheck Advisory: MPDF LFI
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English