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

CVE-2026-7669: SGLang HuggingFace RCE Vulnerability

CVE-2026-7669 is a remote code execution vulnerability in sgl-project SGLang up to 0.5.9 that bypasses trust_remote_code security settings. This article covers technical details, affected versions, and mitigation strategies.

Published: May 7, 2026

CVE-2026-7669 Overview

CVE-2026-7669 is a code injection vulnerability in sgl-project SGLang up to version 0.5.9. The flaw resides in the get_tokenizer function within python/sglang/srt/utils/hf_transformers_utils.py, which handles HuggingFace transformer tokenizer loading. When a caller passes trust_remote_code=False, SGLang silently re-invokes AutoTokenizer.from_pretrained with trust_remote_code=True, overriding the explicit security setting. A model repository containing a malicious tokenizer.py referenced via auto_map in tokenizer_config.json will execute arbitrary Python in the SGLang process. The weakness is classified under [CWE-74] (Improper Neutralization of Special Elements in Output).

Critical Impact

Loading an attacker-controlled HuggingFace model in SGLang executes arbitrary Python code in the inference process, even when callers explicitly set trust_remote_code=False.

Affected Products

  • sgl-project SGLang versions up to and including 0.5.9
  • Deployments using HuggingFace transformers==5.3.0 (pinned in pyproject.toml)
  • Both tokenizer_mode="auto" and tokenizer_mode="slow" configurations

Discovery Timeline

  • 2026-05-02 - CVE-2026-7669 published to NVD
  • 2026-05-05 - Last updated in NVD database

Technical Details for CVE-2026-7669

Vulnerability Analysis

The vulnerability emerges from an interaction between SGLang's tokenizer loading logic and HuggingFace transformers v5. When get_tokenizer() requests a tokenizer with trust_remote_code=False, transformers v5 returns a TokenizersBackend instance as the generic fallback for tokenizer classes not present in its registry. SGLang treats this fallback as a failure and retries the call with trust_remote_code=True to recover. This silent escalation overrides the caller's explicit security boundary without emitting any log line or warning. Because transformers==5.3.0 is pinned in pyproject.toml, every current SGLang release exhibits the behavior. The exploit is public, and the vendor did not respond to early disclosure outreach.

Root Cause

The root cause is an unsafe fallback path that re-issues the tokenizer load with elevated trust when the first attempt does not return a recognized tokenizer class. The retry ignores the security intent encoded in the original trust_remote_code=False argument. The condition triggering the retry is reachable for any tokenizer class HuggingFace v5 routes through TokenizersBackend, which is the generic catch-all path.

Attack Vector

An attacker publishes a HuggingFace model repository containing a tokenizer_config.json with an auto_map entry pointing at a malicious tokenizer.py. When an SGLang operator or downstream service loads that model identifier, the second AutoTokenizer.from_pretrained call honors auto_map and imports the attacker's Python module. Code execution occurs in the SGLang process context, with access to model weights, GPU memory, environment secrets, and any network reachability the inference host has. The attack is network-reachable but requires the target to load a specific model, contributing to the high attack complexity rating.

No verified exploit code is reproduced here. See the GitHub PoC Repository and VulDB Vulnerability #360817 for technical artifacts.

Detection Methods for CVE-2026-7669

Indicators of Compromise

  • Unexpected child processes or outbound network connections originating from the SGLang Python process after a model load
  • Presence of auto_map entries in tokenizer_config.json of cached HuggingFace models under ~/.cache/huggingface/
  • Loaded modules in the SGLang process with paths inside HuggingFace cache directories rather than site-packages
  • Filesystem writes or credential access from the inference worker shortly after a new model identifier is requested

Detection Strategies

  • Audit all SGLang model load requests and correlate the model repository identifier against an allowlist of trusted publishers
  • Inspect tokenizer_config.json for any auto_map keys before permitting a model into the serving environment
  • Hook or instrument AutoTokenizer.from_pretrained to log the effective trust_remote_code value and alert on True when the caller passed False
  • Monitor for Python import events sourced from cache paths using EDR or eBPF-based file-execution telemetry

Monitoring Recommendations

  • Forward SGLang stdout, stderr, and Python audit hook events into a centralized log pipeline for retention and analytics
  • Alert on any process spawned by the inference worker that is not in a known-good baseline (shell, curl, wget, ssh)
  • Track egress connections from inference hosts to non-HuggingFace destinations during model bootstrap windows

How to Mitigate CVE-2026-7669

Immediate Actions Required

  • Restrict SGLang deployments to load only models from a vetted internal registry or specific allowlisted HuggingFace repositories
  • Run SGLang inference workers as unprivileged users inside containers with read-only filesystems and no outbound internet beyond model registries
  • Pre-fetch and audit tokenizer artifacts in an isolated environment, rejecting any model whose tokenizer_config.json contains an auto_map entry
  • Block or proxy huggingface.co traffic from production inference hosts and serve approved models from an internal mirror

Patch Information

No vendor patch has been published for SGLang at the time of NVD disclosure. The vendor was contacted prior to public disclosure but did not respond. Track the VulDB Vulnerability #360817 entry and the SGLang project for upstream fixes, and pin to a fixed release once available.

Workarounds

  • Patch get_tokenizer locally to remove the fallback that re-invokes AutoTokenizer.from_pretrained with trust_remote_code=True
  • Downgrade transformers below v5 if compatibility allows, since the TokenizersBackend fallback path is the trigger
  • Wrap AutoTokenizer.from_pretrained with a monkeypatch that forces trust_remote_code=False regardless of internal callers
  • Strip auto_map from any cached tokenizer_config.json before loading
bash
# Configuration example: scan cached tokenizer configs for auto_map abuse
find ~/.cache/huggingface -name 'tokenizer_config.json' \
  -exec grep -l '"auto_map"' {} \;

# Run SGLang with a hardened wrapper that pins trust_remote_code=False
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
python -m sglang.launch_server --model-path /opt/models/approved/llama-3 \
  --tokenizer-mode slow

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechSglang

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-74
  • Technical References
  • GitHub PoC Repository

  • VulDB Submission ID #799263

  • VulDB Vulnerability #360817

  • VulDB Vulnerability #360817 CTI
  • Related CVEs
  • CVE-2026-5760: SGLang RCE Vulnerability via Jinja2
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