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-2026-35477

CVE-2026-35477: InvenTree RCE Vulnerability

CVE-2026-35477 is a remote code execution flaw in InvenTree affecting versions 1.2.3 to 1.2.6 that allows staff users to execute arbitrary code via template rendering. This post covers technical details, impact, and mitigation.

Published: April 9, 2026

CVE-2026-35477 Overview

InvenTree, an Open Source Inventory Management System, contains a Jinja2 template sandbox bypass vulnerability affecting versions 1.2.3 through 1.2.6. The vulnerability exists because the fix for CVE-2026-27629, which upgraded the PART_NAME_FORMAT validator to use jinja2.sandbox.SandboxedEnvironment, was not consistently applied throughout the codebase. Specifically, the actual renderer in part/helpers.py still uses the non-sandboxed jinja2.Environment, creating a critical security gap where templates can pass validation but execute arbitrary code during rendering.

Critical Impact

A staff user with settings access can craft a malicious template that exploits the validation vs. rendering discrepancy to achieve arbitrary code execution on the server.

Affected Products

  • InvenTree versions 1.2.3 through 1.2.6

Discovery Timeline

  • April 8, 2026 - CVE-2026-35477 published to NVD
  • April 8, 2026 - Last updated in NVD database

Technical Details for CVE-2026-35477

Vulnerability Analysis

This vulnerability is classified as CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine). The root issue stems from an incomplete security patch that introduced a sandbox environment for template validation while leaving the production renderer unprotected.

The security gap arises from two distinct problems: First, the validator uses jinja2.sandbox.SandboxedEnvironment while the renderer in part/helpers.py uses the standard jinja2.Environment. Second, the validator uses a dummy Part instance with pk=None, which allows attackers to craft conditional template expressions that behave differently during validation versus production rendering.

This means an attacker can design a template containing conditional logic that appears benign during validation (when pk is None) but executes malicious code when rendered with an actual Part object that has a valid primary key.

Root Cause

The root cause is a mismatch between the template validation and rendering environments. When the security fix for CVE-2026-27629 was implemented, developers upgraded the validator to use a sandboxed Jinja2 environment but failed to update the actual rendering code path. The use of a dummy Part instance with pk=None during validation further compounds the issue by allowing attackers to use conditional expressions that only trigger during production rendering.

Attack Vector

The attack requires a staff user with settings access privileges. The attacker crafts a malicious PART_NAME_FORMAT template containing conditional logic that checks if the Part's primary key is not None. During validation, this condition evaluates to false (since the validator uses a dummy Part with pk=None), causing the template to appear safe. However, during actual rendering with real Part objects, the condition evaluates to true, and the malicious code executes within the unsandboxed Jinja2 environment, leading to arbitrary code execution on the server.

The attack is network-accessible and requires no user interaction beyond the attacker's initial access. Since the vulnerability requires staff-level permissions, the scope of potential attackers is limited to trusted users who have been granted elevated privileges.

Detection Methods for CVE-2026-35477

Indicators of Compromise

  • Unusual PART_NAME_FORMAT settings containing complex conditional expressions or Jinja2 constructs beyond simple variable substitution
  • Server logs showing template rendering errors or unexpected system calls originating from the part naming functionality
  • Modified settings entries in the application database related to part name formatting

Detection Strategies

  • Monitor InvenTree application settings for changes to PART_NAME_FORMAT values, especially those containing conditional logic or Jinja2 expressions
  • Implement code review processes for any template configurations that include conditional statements or advanced Jinja2 features
  • Deploy web application firewalls (WAF) with rules to detect template injection patterns in POST requests to settings endpoints

Monitoring Recommendations

  • Enable detailed logging for all settings changes in InvenTree and alert on modifications to template-related configurations
  • Monitor server processes for unexpected child processes or network connections that could indicate code execution
  • Implement file integrity monitoring on the InvenTree installation directory to detect any unauthorized modifications

How to Mitigate CVE-2026-35477

Immediate Actions Required

  • Upgrade InvenTree to version 1.2.7 or 1.3.0 immediately to apply the security patch
  • Audit all staff user accounts and restrict settings access to only essential personnel
  • Review current PART_NAME_FORMAT settings for any suspicious template expressions and reset to default if necessary

Patch Information

This vulnerability is fixed in InvenTree versions 1.2.7 and 1.3.0. The fix ensures that the same sandboxed Jinja2 environment is used consistently for both validation and rendering, eliminating the security gap. For detailed patch information, refer to the GitHub Security Advisory.

Workarounds

  • If immediate patching is not possible, temporarily restrict settings access permissions to only the most trusted administrators
  • Implement network-level access controls to limit which users can reach the InvenTree settings interface
  • Consider disabling custom PART_NAME_FORMAT templates entirely and using default naming conventions until the patch can be applied
bash
# Verify InvenTree version and check for updates
inventree-admin version
# Review current part name format settings
inventree-admin shell -c "from common.models import InvenTreeSetting; print(InvenTreeSetting.get_setting('PART_NAME_FORMAT'))"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechInventure

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1336
  • Technical References
  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-8468: Elixir Plug Library DoS Vulnerability

  • CVE-2026-8295: simdjson Information Disclosure Vulnerability

  • CVE-2025-68421: Comarch ERP Optima Auth Bypass Vulnerability

  • CVE-2025-68420: Comarch ERP Optima Privilege Escalation
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