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-25362

CVE-2025-25362: Spacy-LLM SSTI RCE Vulnerability

CVE-2025-25362 is a Server-Side Template Injection flaw in Spacy-LLM v0.7.2 that enables remote code execution through crafted template payloads. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-25362 Overview

A Server-Side Template Injection (SSTI) vulnerability has been identified in Spacy-LLM v0.7.2, a popular library that integrates Large Language Models (LLMs) into spaCy NLP pipelines. This vulnerability allows attackers to execute arbitrary code by injecting a crafted payload into the template field, potentially leading to complete system compromise.

Critical Impact

Attackers can achieve remote code execution on systems running vulnerable versions of Spacy-LLM by exploiting the template injection vulnerability, potentially gaining full control over the affected server.

Affected Products

  • Spacy-LLM v0.7.2
  • Applications using Spacy-LLM with user-controllable template inputs
  • NLP pipelines integrating vulnerable Spacy-LLM versions

Discovery Timeline

  • 2025-03-05 - CVE-2025-25362 published to NVD
  • 2025-04-02 - Last updated in NVD database

Technical Details for CVE-2025-25362

Vulnerability Analysis

This Server-Side Template Injection vulnerability exists in the template processing functionality of Spacy-LLM. The library uses a templating engine to construct prompts for LLM interactions, but fails to properly sanitize user-supplied input before processing it through the template engine. This allows attackers to inject malicious template directives that are evaluated server-side, leading to arbitrary code execution.

The vulnerability is classified under CWE-94 (Improper Control of Generation of Code), which encompasses scenarios where user-controlled input is incorporated into dynamically generated code without proper validation. In the context of SSTI, the template engine interprets injected payloads as legitimate template expressions rather than treating them as plain text data.

Root Cause

The root cause of this vulnerability lies in the insufficient input validation and sanitization of the template field in Spacy-LLM. When user-supplied data is passed to the templating engine without proper escaping or sandboxing, the engine processes malicious template syntax as executable code. This is a common pattern in SSTI vulnerabilities where the boundary between data and code is not properly enforced in template processing pipelines.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by submitting specially crafted input to the template field of an application using Spacy-LLM. The malicious payload leverages the template engine's expression evaluation capabilities to access underlying Python objects and execute arbitrary commands on the server.

Typical SSTI exploitation in Python environments involves traversing the object hierarchy to reach dangerous functions like os.system() or subprocess.Popen(). The attacker crafts template expressions that navigate from basic objects to these powerful system-level functions, ultimately achieving code execution.

For detailed technical analysis and proof-of-concept information, refer to the Hacktive Security Blog CVE Analysis and the GitHub Issue Discussion.

Detection Methods for CVE-2025-25362

Indicators of Compromise

  • Unusual template syntax patterns in application logs containing characters like {{, }}, {%, or %}
  • Unexpected process spawning from Python/Spacy-LLM application processes
  • Suspicious outbound network connections originating from NLP pipeline services
  • Log entries showing access to Python magic methods or internal objects like __class__, __mro__, or __subclasses__

Detection Strategies

  • Implement input validation rules to detect and block common SSTI payloads in template fields
  • Monitor application logs for template syntax injection attempts and unusual expression patterns
  • Deploy web application firewalls (WAF) with rules specifically targeting template injection payloads
  • Use runtime application self-protection (RASP) to detect code execution attempts within template processing

Monitoring Recommendations

  • Enable verbose logging for Spacy-LLM template processing operations
  • Set up alerts for anomalous command execution patterns from Python processes
  • Monitor file system access patterns for unauthorized reads or writes from application contexts
  • Implement network segmentation and monitor for unexpected egress traffic from LLM pipeline servers

How to Mitigate CVE-2025-25362

Immediate Actions Required

  • Audit all applications using Spacy-LLM v0.7.2 to identify exposed template input vectors
  • Implement strict input validation to sanitize template field inputs before processing
  • Restrict network access to affected systems and apply principle of least privilege
  • Review the GitHub Issue Discussion for vendor guidance and patch availability

Patch Information

Monitor the official Spacy-LLM repository for security patches addressing this vulnerability. Check the GitHub Issue Discussion for updates from the maintainers regarding fixes and recommended upgrade paths. Upgrade to a patched version as soon as one becomes available.

Workarounds

  • Avoid passing user-controlled input directly to template fields without strict sanitization
  • Implement a whitelist approach for allowed template content and reject any input containing template syntax characters
  • Consider sandboxing the template processing environment to limit the impact of successful exploitation
  • Use parameterized templates where user input is strictly separated from template logic
bash
# Configuration example - Input validation for template fields
# Add to your application's input processing layer

# Example: Block common SSTI patterns in input
# Reject inputs containing: {{ }} {% %} __ (double underscore)
# Implement at application layer before passing to Spacy-LLM

# Network isolation for affected services
# Restrict outbound connections from LLM pipeline servers
iptables -A OUTPUT -m owner --uid-owner spacy-user -j DROP

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechSpacy

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.45%

  • 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-94
  • Technical References
  • GitHub Issue Discussion

  • Hacktive Security Blog CVE Analysis
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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