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-2025-27837

CVE-2025-27837: Artifex Ghostscript Path Traversal Issue

CVE-2025-27837 is a path traversal vulnerability in Artifex Ghostscript that enables unauthorized file access via truncated paths with invalid UTF-8 characters. This article covers technical details, affected versions, and mitigations.

Updated: January 22, 2026

CVE-2025-27837 Overview

A path traversal vulnerability has been discovered in Artifex Ghostscript before version 10.05.0 that allows unauthorized access to arbitrary files on the system. The vulnerability occurs through improper handling of truncated paths containing invalid UTF-8 characters in the Windows-specific components base/gp_mswin.c and base/winrtsup.cpp. This flaw enables attackers to bypass path restrictions and read or write files outside intended directories.

Critical Impact

Attackers can exploit this vulnerability to access arbitrary files on vulnerable systems through malformed UTF-8 path sequences, potentially leading to information disclosure, data tampering, or system compromise.

Affected Products

  • Artifex Ghostscript versions prior to 10.05.0
  • Windows deployments using base/gp_mswin.c and base/winrtsup.cpp components
  • Applications and services utilizing vulnerable Ghostscript installations for document processing

Discovery Timeline

  • 2025-03-25 - CVE-2025-27837 published to NVD
  • 2025-04-01 - Last updated in NVD database

Technical Details for CVE-2025-27837

Vulnerability Analysis

This vulnerability falls under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), commonly known as Path Traversal or Directory Traversal. The flaw exists in how Ghostscript handles file paths on Windows systems, specifically within the base/gp_mswin.c and base/winrtsup.cpp source files.

The core issue stems from insufficient validation of file paths that contain truncated or malformed UTF-8 character sequences. When processing such paths, the application fails to properly sanitize directory traversal sequences, allowing an attacker to escape the intended directory structure and access files elsewhere on the filesystem.

This network-accessible vulnerability requires no user interaction or prior authentication to exploit, making it particularly dangerous in environments where Ghostscript processes untrusted input such as PDF files or PostScript documents from external sources.

Root Cause

The vulnerability originates from improper input validation in the Windows-specific file handling code. The base/gp_mswin.c and base/winrtsup.cpp components do not adequately validate or sanitize file paths containing invalid UTF-8 character sequences. When these truncated UTF-8 characters are encountered, the path canonicalization logic fails to properly resolve the path, enabling directory traversal attacks.

The Windows API's handling of malformed Unicode strings, combined with Ghostscript's insufficient path validation, creates a condition where specially crafted paths can bypass security controls designed to restrict file access to specific directories.

Attack Vector

The attack can be initiated remotely over the network without requiring authentication. An attacker can craft a malicious document (such as a PDF or PostScript file) containing embedded file path references with truncated UTF-8 characters. When Ghostscript processes this document, the malformed path sequences bypass the directory restrictions.

The vulnerability mechanism relies on the following attack pattern:

  1. Attacker crafts a document containing file operations with paths that include truncated/invalid UTF-8 sequences
  2. The malformed UTF-8 characters cause path parsing to behave unexpectedly
  3. Directory traversal sequences (such as ../) embedded within or after the invalid characters bypass validation
  4. Ghostscript accesses files outside the intended directory, potentially reading sensitive system files or writing malicious content

For detailed technical information on the vulnerability mechanism, refer to the Ghostscript Bug Report #708238.

Detection Methods for CVE-2025-27837

Indicators of Compromise

  • Unexpected file access attempts from Ghostscript processes targeting system directories or sensitive files
  • Log entries showing file paths with unusual Unicode sequences or encoding errors
  • Ghostscript process accessing files outside designated working directories
  • Document processing errors followed by unauthorized file system activity

Detection Strategies

  • Monitor Ghostscript process file system calls for access to paths containing invalid UTF-8 sequences or directory traversal patterns
  • Implement file integrity monitoring on sensitive directories that should not be accessed by document processing applications
  • Configure endpoint detection to alert on Ghostscript processes attempting to read or write files outside whitelisted directories
  • Review application logs for path canonicalization errors or Unicode handling exceptions

Monitoring Recommendations

  • Enable verbose logging for Ghostscript installations processing external documents
  • Deploy SentinelOne agents with behavioral AI to detect anomalous file access patterns from document processing applications
  • Set up alerts for any Ghostscript process accessing files in sensitive system directories such as C:\Windows\ or user profile locations
  • Monitor network traffic for potentially malicious documents being submitted to Ghostscript processing endpoints

How to Mitigate CVE-2025-27837

Immediate Actions Required

  • Upgrade Artifex Ghostscript to version 10.05.0 or later immediately
  • If immediate patching is not possible, restrict network access to systems running vulnerable Ghostscript versions
  • Implement strict input validation on any documents processed by Ghostscript
  • Review and restrict file system permissions for the Ghostscript process to limit impact of potential exploitation

Patch Information

Artifex has addressed this vulnerability in Ghostscript version 10.05.0. Organizations should upgrade to this version or later to remediate the vulnerability. The fix addresses the improper path handling in both base/gp_mswin.c and base/winrtsup.cpp to properly validate and sanitize file paths containing UTF-8 characters.

Patch details and technical information can be found in the Ghostscript Bug Report #708238.

Workarounds

  • Run Ghostscript in a sandboxed environment with restricted file system access to minimize the impact of path traversal
  • Use -dSAFER flag when invoking Ghostscript to enable restricted operation mode, though this may not fully mitigate the vulnerability
  • Implement application-level input validation to reject documents containing suspicious path references or unusual character sequences
  • Deploy Web Application Firewalls or input filters to sanitize uploaded documents before Ghostscript processing
bash
# Example: Running Ghostscript in safer mode with restricted permissions
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps

# Verify installed Ghostscript version
gs --version
# Ensure output shows 10.05.0 or higher

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGhostscript

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.34%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Vendor Resources
  • Ghostscript Bug Report #708238
  • Related CVEs
  • CVE-2025-27830: Artifex Ghostscript Buffer Overflow Flaw

  • CVE-2021-3781: Artifex Ghostscript RCE 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