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
    • 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-35044

CVE-2026-35044: BentoML Template Injection RCE Vulnerability

CVE-2026-35044 is a remote code execution vulnerability in BentoML that exploits unsandboxed Jinja2 template rendering to execute arbitrary Python code on host machines. This article covers technical details, affected versions, and mitigation.

Published: April 10, 2026

CVE-2026-35044 Overview

CVE-2026-35044 is a Code Injection vulnerability in BentoML, a Python library for building online serving systems optimized for AI apps and model inference. Prior to version 1.4.38, the Dockerfile generation function generate_containerfile() in src/bentoml/_internal/container/generate.py uses an unsandboxed jinja2.Environment with the jinja2.ext.do extension to render user-provided dockerfile_template files. When a victim imports a malicious bento archive and runs bentoml containerize, attacker-controlled Jinja2 template code executes arbitrary Python directly on the host machine, bypassing all container isolation.

Critical Impact

This vulnerability allows attackers to execute arbitrary Python code on the host machine through malicious Jinja2 templates, completely bypassing container isolation when processing untrusted bento archives.

Affected Products

  • BentoML versions prior to 1.4.38

Discovery Timeline

  • 2026-04-06 - CVE CVE-2026-35044 published to NVD
  • 2026-04-07 - Last updated in NVD database

Technical Details for CVE-2026-35044

Vulnerability Analysis

This vulnerability stems from insecure template processing in BentoML's container generation workflow. The generate_containerfile() function renders user-controlled Dockerfile templates using Jinja2 without proper sandboxing. The inclusion of the jinja2.ext.do extension is particularly dangerous as it allows arbitrary Python expression execution within template tags.

When a user imports a bento archive from an untrusted source and subsequently runs the bentoml containerize command, the malicious template embedded within the archive is processed. The unsandboxed Jinja2 environment interprets attacker-controlled template directives, enabling arbitrary code execution with the privileges of the user running the containerize command.

The vulnerability is classified under CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), highlighting the failure to sanitize or sandbox template inputs before processing.

Root Cause

The root cause is the use of an unsandboxed jinja2.Environment for rendering user-provided dockerfile_template files. The jinja2.ext.do extension enables execution of arbitrary Python statements within templates, which when combined with the lack of sandboxing, allows complete code execution on the host system. BentoML trusted user-provided template content without validating or restricting the template capabilities.

Attack Vector

An attacker crafts a malicious bento archive containing a specially crafted dockerfile_template with embedded Jinja2 template injection payloads. The attack requires user interaction—specifically, the victim must import the malicious bento archive and execute the bentoml containerize command. Upon execution, the malicious Jinja2 template code runs arbitrary Python code directly on the host machine, outside of any container sandbox.

The attack leverages Jinja2's {% do %} extension syntax to execute Python statements. Common exploitation techniques include using Python's built-in functions to access the operating system, read sensitive files, establish reverse shells, or download and execute additional payloads.

Detection Methods for CVE-2026-35044

Indicators of Compromise

  • Unexpected Python process executions during bentoml containerize operations
  • Suspicious network connections originating from BentoML processes
  • Unusual file system access patterns when processing bento archives
  • Presence of Jinja2 template syntax containing {% do %} blocks with Python imports or system calls in bento archives

Detection Strategies

  • Monitor for suspicious Jinja2 template patterns in imported bento archives, particularly those containing {% do %} directives
  • Implement file integrity monitoring on systems running BentoML to detect unauthorized modifications
  • Use endpoint detection to identify unusual child process spawning from Python processes running BentoML
  • Review imported bento archives for dockerfile_template files containing potentially malicious template code

Monitoring Recommendations

  • Enable detailed logging for BentoML operations, particularly containerize workflows
  • Monitor process execution chains for unexpected commands spawned during bento archive processing
  • Implement network monitoring for unusual outbound connections during containerize operations
  • Consider sandboxing BentoML operations in isolated environments when processing untrusted archives

How to Mitigate CVE-2026-35044

Immediate Actions Required

  • Upgrade BentoML to version 1.4.38 or later immediately
  • Audit all recently imported bento archives for potentially malicious template content
  • Avoid importing or containerizing bento archives from untrusted sources until the patch is applied
  • Review system logs for any signs of compromise related to BentoML containerize operations

Patch Information

This vulnerability is fixed in BentoML version 1.4.38. The patch addresses the insecure template rendering by implementing proper sandboxing for the Jinja2 environment used in Dockerfile generation. Users should upgrade to this version or later to remediate the vulnerability.

For additional details, refer to the GitHub Security Advisory.

Workarounds

  • Only import and containerize bento archives from trusted, verified sources
  • Manually inspect dockerfile_template files within bento archives before running containerize commands
  • Run BentoML containerize operations in isolated virtual machines or sandboxed environments to limit potential impact
  • Implement network segmentation to restrict outbound connections from systems processing untrusted bento archives

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechBentoml

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-1336
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-35043: BentoML Cloud Deployment RCE Vulnerability

  • CVE-2026-33744: BentoML RCE Vulnerability

  • CVE-2024-9070: BentoML Deserialization RCE Vulnerability

  • CVE-2025-27520: BentoML RCE 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