Close Menu
  • Tech Insights
  • Laptops
  • Mobiles
  • Gaming
  • Apps
  • Money
  • Latest in Tech
Facebook X (Twitter) Instagram
Facebook X (Twitter) Instagram
TechzLab – Tech News, Gadgets, Mobile, IT Updates & ReviewsTechzLab – Tech News, Gadgets, Mobile, IT Updates & Reviews
  • Tech Insights
  • Laptops
  • Mobiles
  • Gaming
  • Apps
  • Money
  • Latest in Tech
TechzLab – Tech News, Gadgets, Mobile, IT Updates & ReviewsTechzLab – Tech News, Gadgets, Mobile, IT Updates & Reviews
Home » Malicious Hugging Face Models Could Trigger Remote Code Execution
Apps

Malicious Hugging Face Models Could Trigger Remote Code Execution

By June 7, 2026No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Organizations using vulnerable versions of the Hugging Face Transformers library could unknowingly execute attacker-controlled code simply by loading a malicious AI model.

Researchers at Pluto disclosed a remote code execution (RCE) vulnerability that bypasses the library’s built-in trust_remote_code=False security control, potentially exposing cloud credentials, SSH keys, API tokens, and other sensitive assets.

“One poisoned field in a model’s config.json silently executes arbitrary code on anyone who loads it. No special flags. No warnings. Just the standard from_pretrained() call,” said researchers in their analysis.

Key takeaways from the vulnerability

  • CVE-2026-4372 allows remote code execution through malicious Hugging Face model configurations, bypassing the library’s trust_remote_code=False security control.
  • The vulnerability affects multiple Transformers versions when the optional kernels package is installed, which is common in GPU-accelerated AI environments.
  • Attackers can trigger code execution through a standard from_pretrained() call, potentially exposing cloud credentials, API tokens, SSH keys, and other sensitive assets.

Inside the Hugging Face RCE flaw

The vulnerability, tracked as CVE-2026-4372affects multiple versions of Hugging Face Transformers when the optional kernels package is installed.

Although the package is not enabled by default, it is commonly used in GPU-accelerated inference environments and is often included through the transformers[all] installation option.

Researchers said vulnerable Transformers versions were downloaded about 232 million times before a patch was released, creating supply chain risk for organizations using third-party AI models.

What caused the vulnerability?

The flaw originates in how Transformers processes model configuration files (config.json).

Researchers found that the library relied on a generic setattr() mechanism that applied configuration parameters directly to internal objects, including private attributes that were never intended to be influenced by untrusted input.

As a result, attackers could manipulate internal settings through a specially crafted model configuration.

How the exploit works

One of those settings, _attn_implementation_internalcontrols the selection of attention kernels within the library.

By modifying this attribute to reference a malicious kernel repository hosted on Hugging Face Hub, an attacker could trigger the automatic download and import of attacker-controlled Python code. Because this process occurred during a routine from_pretrained() operation, victims would see no unusual prompts or warnings before the malicious code executed.

Researchers noted that the flaw bypassed one of the platform’s primary security controls, the trust_remote_code=False setting, which organizations rely on to prevent untrusted code from running.

Exploitation required no special permissions, security exceptions, or additional user interaction beyond loading the model.

Proof-of-concept exploits demonstrated that attackers could access cloud credentials, API tokens, and other sensitive assets, potentially providing a foothold into enterprise infrastructure.

Must-read security coverage

Reducing AI supply chain risks

Because CVE-2026-4372 highlights the risks associated with AI supply chains and third-party model repositories, security teams should strengthen visibility, access controls, and monitoring across machine learning environments.

  • Upgrade to the latest Transformers versionreview environments that include the optional kernels package, and restrict the use of unapproved third-party AI models.
  • Maintain an up-to-date software bill of materials (SBOM) and AI asset inventory to track deployed models, libraries, dependencies, and related components.
  • Use isolated, sandboxed environments to evaluate external models before introducing them into production workflows.
  • Implement least-privilege access controls and avoid storing long-lived credentials, API keys, or sensitive secrets on model-loading systems.
  • Restrict outbound network connections and monitor for unusual model downloads, package imports, repository references, and other suspicious activity originating from machine learning infrastructure.
  • Test incident response plans and use attack-simulation solutions with scenarios focused on AI workloads and supply chain compromise.

Collectively, these steps can help organizations reduce their exposure to AI supply chain threats while building resilience against attacks targeting machine learning environments and third-party model ecosystems.

Editor’s note: This article originally appeared on our sister publication, eSecurityPlanet.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Low-power AI could define the next era of global innovation

July 30, 2026

The best hidden macOS 27 features people aren’t talking about

July 27, 2026

Android 17 Makes iPhone Switching Easier

July 26, 2026
Leave A Reply Cancel Reply

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest
  • Samsung Galaxy Z Fold 8 review: a shot in the arm for the foldables market August 3, 2026
  • Best MagSafe wallets of 2026: Expert tested and reviewed August 3, 2026
  • ‘It’s without a doubt one of the least detrimental privacy-focused solutions to your mobile experience’: I spent a month testing GrapheneOS — and it almost made me ditch my Android phone entirely July 30, 2026
  • Low-power AI could define the next era of global innovation July 30, 2026
  • NYT Strands hints and answers for Wednesday, July 29 (game #878) July 29, 2026
We are social
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
  • Vimeo

Subscribe to Updates

Get the latest creative news from Techzlab.

Tags
AI Amazon Anthropic Apple artificial intelligence ChatGPT cybersecurity data centers defense tech Donald Trump electric vehicles Elon Musk evergreens EVs Exclusive Fintech gemini Google Grok In Brief India Layoffs Meta Microsoft Mythos nvidia nvidia gtc Nvidia GTC 2026 Openai Perplexity Polymarket Redwood Materials sam altman Sequoia Capital siri social media Softbank SpaceX Spotify Tesla Tim Cook Truecaller Uber Windows X
Archives
Quick Link
  • Apps (403)
  • From the Editor (4)
  • Gaming (382)
  • Laptops (405)
  • Latest in Tech (404)
  • Mobiles (405)
  • Money (228)
  • Tech Insights (406)
Don't miss

Best MagSafe wallets of 2026: Expert tested and reviewed

August 3, 2026

I tested a premium Linux laptop that’s as light as it is powerful – here’s why I love it

July 29, 2026

Is the Electric Trike the Next Big Thing in Shared Micromobility?

July 28, 2026
Follow us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
  • Vimeo
© 2026 Techzlab.com Designed and Developed by WebExpert.
  • Home
  • From the Editor
  • Money
  • Privacy Policy
  • Contact

Type above and press Enter to search. Press Esc to cancel.