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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-64087

CVE-2025-64087: XDocReport FreeMarker SSTI RCE Vulnerability

CVE-2025-64087 is a Server-Side Template Injection flaw in opensagres XDocReport's FreeMarker component that enables remote code execution. This article covers the technical details, affected versions, impact, and mitigation.

Published: January 23, 2026

CVE-2025-64087 Overview

A Server-Side Template Injection (SSTI) vulnerability has been identified in the FreeMarker component of opensagres XDocReport, affecting versions 1.0.0 through 2.1.0. This vulnerability allows remote attackers to execute arbitrary code on affected systems by injecting crafted template expressions into documents processed by the vulnerable library.

Server-Side Template Injection vulnerabilities occur when user-controlled input is embedded into server-side templates without proper sanitization. In the case of XDocReport, the FreeMarker template engine processes document templates that may contain malicious expressions, enabling attackers to break out of the template sandbox and execute arbitrary Java code on the underlying server.

Critical Impact

This vulnerability enables unauthenticated remote code execution through malicious template expressions, potentially allowing complete system compromise.

Affected Products

  • opensagres XDocReport v1.0.0 through v2.1.0
  • Applications utilizing XDocReport's FreeMarker template processing functionality
  • Document generation services that process untrusted template input

Discovery Timeline

  • 2026-01-20 - CVE-2025-64087 published to NVD
  • 2026-01-21 - Last updated in NVD database

Technical Details for CVE-2025-64087

Vulnerability Analysis

The vulnerability exists within XDocReport's integration with the FreeMarker template engine. XDocReport is a Java library used for generating documents (such as Word, OpenDocument, and PDF files) from templates. When processing document templates, the FreeMarker component evaluates embedded expressions without adequate restrictions on dangerous operations.

FreeMarker templates support powerful expression syntax that, when not properly sandboxed, can be leveraged to access Java's runtime environment. An attacker who can influence the content of templates processed by XDocReport can inject malicious FreeMarker expressions that execute arbitrary code when the template is rendered.

The vulnerability is classified under CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), which describes scenarios where template engines process untrusted input without proper sanitization or sandboxing.

Root Cause

The root cause of this vulnerability is insufficient input validation and inadequate sandboxing of the FreeMarker template engine within XDocReport. The library fails to properly restrict dangerous template expressions that can access Java's reflection APIs and runtime execution capabilities. When user-controlled data flows into template contexts, attackers can craft payloads that escape the intended template processing boundaries.

Attack Vector

This vulnerability is exploitable over the network without requiring authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Identifying an application using vulnerable versions of XDocReport for document generation
  2. Crafting a malicious document template containing SSTI payloads targeting FreeMarker
  3. Submitting the malicious template to the application for processing
  4. The FreeMarker engine evaluates the injected expressions, executing arbitrary Java code

Typical attack scenarios include document generation services that accept user-uploaded templates, report generation systems, and any application that merges user data with document templates using XDocReport.

The attack leverages FreeMarker's built-in features to access Java objects and invoke methods that can lead to arbitrary command execution. Common exploitation techniques involve using FreeMarker's new() built-in or accessing the freemarker.template.utility.Execute class to run system commands.

For detailed technical analysis and proof-of-concept information, refer to the HackMD Security Analysis Document and the GitHub Pull Request Discussion.

Detection Methods for CVE-2025-64087

Indicators of Compromise

  • Unusual process spawning from Java applications utilizing XDocReport
  • Unexpected network connections originating from document processing services
  • Suspicious command execution patterns following document template uploads
  • Log entries showing FreeMarker template parsing errors with unusual expression patterns
  • Presence of encoded or obfuscated content in uploaded document templates

Detection Strategies

  • Monitor application logs for template processing errors or exceptions related to FreeMarker
  • Implement content inspection for uploaded documents containing suspicious template expressions such as <#assign>, ?new(), or references to Execute class
  • Deploy web application firewalls (WAF) with rules to detect SSTI payloads in document uploads
  • Use runtime application self-protection (RASP) solutions to detect and block template injection attempts

Monitoring Recommendations

  • Enable verbose logging for document processing operations in applications using XDocReport
  • Monitor for unusual Java process behavior including unexpected child processes or network activity
  • Implement file integrity monitoring on document template directories
  • Set up alerts for failed template parsing attempts that may indicate exploitation attempts

How to Mitigate CVE-2025-64087

Immediate Actions Required

  • Identify all applications and services using opensagres XDocReport versions 1.0.0 through 2.1.0
  • Review the GitHub Pull Request #705 for patch details and apply updates when available
  • Implement input validation to reject document templates containing suspicious FreeMarker expressions
  • Restrict document template uploads to trusted users only until patching is complete

Patch Information

Organizations should monitor the opensagres XDocReport GitHub repository for official security patches addressing this vulnerability. The GitHub Pull Request #705 contains discussion related to addressing this security issue.

Review the HackMD Technical Documentation for additional remediation guidance and technical details.

Workarounds

  • Configure FreeMarker with a restrictive TemplateClassResolver to prevent instantiation of dangerous classes
  • Implement a whitelist of allowed template expressions and reject templates containing unauthorized constructs
  • Run document processing services in isolated containers or sandboxed environments with minimal privileges
  • Consider using alternative template engines with stronger security defaults for processing untrusted input
bash
# Example: Restricting FreeMarker class resolver in application configuration
# Add to your XDocReport configuration to limit template capabilities
# Note: Consult XDocReport documentation for exact implementation details

# For containerized deployments, restrict process capabilities
docker run --cap-drop=ALL --cap-add=NET_BIND_SERVICE \
  --read-only --tmpfs /tmp \
  --security-opt=no-new-privileges \
  your-xdocreport-application

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechXdocreport

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.07%

  • 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-1336
  • Technical References
  • GitHub PoC Repository

  • GitHub Project Repository

  • GitHub Pull Request Discussion

  • HackMD Security Analysis Document

  • HackMD Technical Documentation
  • Related CVEs
  • CVE-2025-65482: XDocReport XXE Vulnerability
Default Legacy - Prefooter | 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