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

CVE-2025-9556: Langchaingo SSRF Vulnerability

CVE-2025-9556 is a server-side template injection flaw in Langchaingo that allows attackers to read sensitive files through jinja2 syntax parsing. This post covers the technical details, affected versions, and mitigation steps.

Published: March 11, 2026

CVE-2025-9556 Overview

CVE-2025-9556 is a Server-Side Template Injection (SSTI) vulnerability affecting Langchaingo, a Go implementation of the LangChain framework for building applications powered by large language models. The vulnerability exists in how Langchaingo processes jinja2 syntax when parsing prompts through the gonja library version 1.5.3. The gonja library supports include and extends syntax directives that can be abused to read arbitrary files from the server, enabling attackers to access sensitive system files such as /etc/passwd.

Critical Impact

Unauthenticated attackers can exploit this SSTI vulnerability to read arbitrary files from the server, potentially exposing sensitive configuration data, credentials, and system information without requiring any user interaction.

Affected Products

  • Langchaingo (versions using gonja v1.5.3)
  • Applications built with Langchaingo that process user-controlled prompts
  • Systems running Langchaingo-based LLM applications with jinja2 template parsing enabled

Discovery Timeline

  • September 12, 2025 - CVE-2025-9556 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2025-9556

Vulnerability Analysis

This vulnerability represents a classic Server-Side Template Injection (SSTI) attack vector within the AI/ML application development ecosystem. Langchaingo utilizes jinja2-style templating to provide flexible prompt engineering capabilities, leveraging the gonja library to parse these templates. The core issue lies in gonja's support for the include and extends template directives, which are designed to load and incorporate external template files.

When user-controlled input is processed through the template engine without proper sanitization, an attacker can craft malicious template statements that abuse these file inclusion directives. The template engine interprets these statements as legitimate template operations, executing them with the permissions of the application process. This allows an attacker to traverse the filesystem and read sensitive files, effectively bypassing application-level access controls.

The impact extends beyond simple file disclosure—attackers may be able to enumerate system users, discover application configurations, retrieve database credentials, or gather information for further attacks. In containerized or cloud environments, this could expose service account credentials, API keys, or other secrets mounted into the filesystem.

Root Cause

The root cause of CVE-2025-9556 stems from insufficient input validation and template sandboxing in the gonja library's implementation of jinja2 syntax parsing. The gonja library (v1.5.3) exposes the include and extends template tags without restricting their ability to access arbitrary filesystem paths. When Langchaingo passes user-controlled prompt content to gonja for template processing, these dangerous template constructs remain available and executable.

Secure template engines typically implement sandboxing mechanisms that restrict which template tags are available or limit filesystem access to a designated template directory. The absence of such restrictions in this implementation creates the vulnerability.

Attack Vector

The attack is network-exploitable and requires no authentication or user interaction. An attacker can submit a specially crafted prompt containing malicious template directives to any application endpoint that processes user input through Langchaingo's template parsing functionality. The attack flow involves:

  1. Identifying an endpoint that accepts user-controlled prompt input
  2. Injecting template syntax containing include or extends directives
  3. Specifying a target file path within the template directive
  4. The gonja template engine processes the malicious input and reads the specified file
  5. File contents are incorporated into the template output and returned to the attacker

For example, an attacker could inject a template statement targeting /etc/passwd to enumerate system users, or target configuration files containing database credentials, API keys, or other sensitive application secrets.

Detection Methods for CVE-2025-9556

Indicators of Compromise

  • Unexpected template syntax patterns in application logs, particularly containing include or extends keywords with filesystem paths
  • Access attempts to sensitive files such as /etc/passwd, /etc/shadow, .env, or application configuration files from the application process
  • Unusual patterns in LLM prompt inputs containing jinja2 template delimiters ({% %} or {{ }}) combined with filesystem paths
  • Application errors related to file access or template parsing failures for non-existent paths

Detection Strategies

  • Implement input validation logging to capture and alert on template syntax patterns in user-submitted prompts
  • Deploy Web Application Firewall (WAF) rules to detect and block SSTI payload patterns in request bodies
  • Monitor application logs for gonja template engine errors or unexpected file access operations
  • Use runtime application self-protection (RASP) solutions to detect template injection attempts

Monitoring Recommendations

  • Enable detailed logging for all prompt processing operations in Langchaingo applications
  • Configure file integrity monitoring (FIM) alerts for access to sensitive system files by application processes
  • Implement anomaly detection for unusual patterns in user-submitted prompt content
  • Set up alerts for template parsing errors that may indicate exploitation attempts

How to Mitigate CVE-2025-9556

Immediate Actions Required

  • Audit all Langchaingo deployments to identify applications processing user-controlled prompts through the template engine
  • Implement strict input validation to sanitize or reject prompts containing template syntax before processing
  • Apply the principle of least privilege to application runtime accounts, limiting filesystem access
  • Consider temporarily disabling jinja2 template parsing if not critical to application functionality

Patch Information

The Langchaingo maintainers have addressed this vulnerability. Refer to the GitHub Pull Request #1348 for the specific fix implementation. Review the GitHub Security Advisory GHSA-mgcj-g55g-rf6h for additional details on affected versions and upgrade instructions. The CERT Vulnerability Report VU#949137 provides supplementary coordination and mitigation guidance.

Update Langchaingo to the latest patched version immediately. Organizations should prioritize this update for any production systems processing external or untrusted input.

Workarounds

  • Implement input sanitization to strip or escape template syntax ({% %}, {{ }}) from user-controlled prompts before processing
  • Configure application-level restrictions to block prompts containing include, extends, or filesystem path patterns
  • Deploy network-level controls using a WAF with SSTI detection rules to filter malicious requests
  • Run Langchaingo applications in sandboxed environments with restricted filesystem access using containers or chroot jails
bash
# Example: Input validation wrapper to reject suspicious prompts
# Add validation before passing prompts to Langchaingo template processing
# Reject prompts containing include/extends patterns
grep -E '(\{%.*include|\{%.*extends|/etc/|\.\./)' /dev/stdin && exit 1

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechLangchaingo

  • 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
  • Technical References
  • GitHub Pull Request

  • GitHub Security Advisory

  • CERT Vulnerability Report
  • 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