OH MODEL, WHERE ART THOU: Hacking Chrome’s Local SLM
David Tulis (Senior Threat Researcher · TrendAI), Vincenzo Ciancaglini (AI Threat Research Lead · TrendAI)
[un]prompted II 2026 — The AI Security Practitioner Conference · Day 2 · Stage 2
Overview
In an era where Artificial Intelligence is increasingly integrated into consumer devices, the browser, a ubiquitous application, is becoming a new frontier for AI capabilities – and consequently, for novel security threats. This talk, "OH MODEL, WHERE ART THOU: Hacking Chrome’s Local SLM," presented by Vincenzo Ciancaglini, AI Threat Research Lead, and David Tulis, Senior Threat Researcher at TrendAI, at the [un]prompted II conference, delves into the burgeoning security implications of Small Language Models (SLMs) embedded directly within web browsers, with a specific focus on Google Chrome. The researchers highlight a critical shift: AI is no longer solely a cloud-based service but is now directly on user endpoints, bringing both convenience and unforeseen vulnerabilities.

Key moments
- 0:00 Introduction: AI models integrating into browsers
- 4:15 Critical lack of permission model for local AI
- 6:00 Live demo: Browser-based token mining botnet
- 7:30 Calculating potential revenue from token mining
- 10:00 Prompt injection bypasses Chrome's scam detector
- 12:00 Using Chrome's local model outside its ecosystem
- 18:00 Key takeaways and urgent security recommendations
- 23:30 Q&A: CPU and memory impact of token mining
OH MODEL, WHERE ART THOU: Hacking Chrome’s Local SLM
Speakers: David Tulis (Senior Threat Researcher, TrendAI); Vincenzo Ciancaglini (AI Threat Research Lead, TrendAI)
Conference: [un]prompted II
YouTube: https://www.youtube.com/watch?v=l9lYIeQZkik
Overview
In an era where Artificial Intelligence is increasingly integrated into consumer devices, the browser, a ubiquitous application, is becoming a new frontier for AI capabilities – and consequently, for novel security threats. This talk, "OH MODEL, WHERE ART THOU: Hacking Chrome’s Local SLM," presented by Vincenzo Ciancaglini, AI Threat Research Lead, and David Tulis, Senior Threat Researcher at TrendAI, at the [un]prompted II conference, delves into the burgeoning security implications of Small Language Models (SLMs) embedded directly within web browsers, with a specific focus on Google Chrome. The researchers highlight a critical shift: AI is no longer solely a cloud-based service but is now directly on user endpoints, bringing both convenience and unforeseen vulnerabilities.
The core of their research reveals how the lack of a robust permission model for these local AI features in Chrome—and by extension, other browsers adopting similar technologies—creates fertile ground for abuse. From unauthorized resource consumption akin to crypto jacking to sophisticated prompt injection attacks that compromise security features or enable cross-site scripting, the talk systematically uncovers a range of potential threat scenarios. Ciancaglini and Tulis not only demonstrate these vulnerabilities but also explore the broader landscape of AI-powered malware and the weaponization of on-device inference engines, urging a reevaluation of browser security paradigms in this new AI-driven landscape.
This detailed exploration is particularly timely given the rapid adoption of AI features across major browsers, including Opera, Microsoft Edge, and Firefox, with Chrome leading the charge in terms of maturity and deployment. The speakers emphasize that while their focus is on Chrome, the identified threat scenarios are broadly applicable to any browser integrating local AI models. Their findings serve as a stark warning to both end-users and enterprise security professionals about the emerging risks posed by silent, unthrottled AI inference capabilities residing within one of the most critical applications on our devices.
Background
▶ Watch: Introduction: AI models integrating into browsers (0:00)
The integration of Artificial Intelligence into consumer devices is no longer a futuristic concept but a present reality, profoundly reshaping the computing landscape. Over the past two to three years, the industry has witnessed a significant trend: Edge AI is increasingly being deployed directly onto user hardware. This includes the embedding of Neural Processing Units (NPUs) and Tensor Processing Units (TPUs) in smartphones, the inclusion of foundational models in Apple devices, and Microsoft's push with Copilot+ PCs. This pervasive adoption extends inevitably to web browsers, which are now actively incorporating AI features and local models to enhance user experience and functionality.
The timeline presented by the speakers illustrates this rapid evolution:
- April 2024: Opera announces support for local models.
- Later 2024: Chrome announces Gemini Nano availability in Chrome 126.
- 2025: Microsoft Edge announces support for Phi-2 models.
- August 2025: Firefox moves its inference engine from Wasm to WasmX.
- May 2026: Chrome's Prompt API reaches its final stage of support.
Chrome, though not the first, emerged as the primary focus of this research due to its perceived maturity in integrating these local AI capabilities and its significant global market share (65%). The researchers also noted a public stir when users discovered "4 GB missing" from their hard drives, attributed to Chrome automatically downloading a local model, highlighting the silent and often unacknowledged nature of this deployment.
Chrome for desktop currently utilizes two main model families: the Gemini V3 series, estimated at 8 to 10 billion parameters, and future Gemma 4 derived models, potentially up to 12 billion parameters, depending on system resources. These models are stored as a weights.bin file within the Chrome installation, downloaded on demand when a website attempts to use the Language Model JavaScript APIs. Users can inspect the status and configuration of these models via the chrome://on-device-internals page.
The local models support both built-in Chrome features, such as history searching and content categorization for ad serving, and external APIs. The internal structure involves protobuf files and TFLite classifiers found in the optimization_guide_model_store folder. Crucially, while Chrome offers several APIs, only three are currently broadly available, with others in developer preview. The most significant background finding, and the bedrock of the presented threats, is the absence of a permission model for these local AI APIs. Unlike microphone, camera, or GPS access, there are no user prompts or built-in rate limiting mechanisms for local AI usage, creating an environment ripe for abuse, reminiscent of the browser-based crypto jacking era.
Key Findings
▶ Watch: Live demo: Browser-based token mining botnet (6:00)
The research conducted by TrendAI uncovered several critical findings regarding the security posture of local AI models embedded in web browsers, particularly Chrome. These findings illuminate new attack vectors and underscore significant design flaws that could have far-reaching implications for user privacy, system resources, and overall security.
- Exploitation for Token Mining (Token Jacking): The most immediate and tangible finding is the potential for token mining, a direct parallel to crypto jacking. Due to the lack of a permission model and absence of throttling mechanisms for local AI API usage, malicious websites can silently leverage a user's local model to generate AI tokens. This consumes CPU, GPU, and memory resources without the user's knowledge or consent, effectively turning their browser into a node in a distributed inference botnet. The researchers demonstrated the economic viability of this attack, showing that even with conservative estimates, a botnet could generate substantial revenue by offering "cheap tokens" for various AI tasks (summarizing, translating, OCR, captcha bypass) to a reseller network.
- Pervasive Prompt Injection Vulnerabilities: The local models, such as Gemini V3, were found to be highly susceptible to prompt injection. This vulnerability extends beyond mere manipulation of AI output; it directly impacts security decisions and user interactions.
- Scam Detection Bypass (Historical): The Chrome on-device scam detector, which previously relied on local models to evaluate web page text, could be trivially injected. Attackers could instruct the model to claim a benign brand or intent, sending misleading signals to the safe browsing server and potentially allowing scam sites to bypass initial detection. While Chrome has since moved this feature to a cloud model and improved it, the principle remains: local models should not be trusted for security decision-making.
- Cross-Site Scripting (XSS) via Model Output: If the output of a prompt-injected local model is subsequently rendered into a webpage's HTML (e.g., within an
innerHTMLtag), it can lead to Cross-Site Scripting (XSS) vulnerabilities. This allows attackers to execute arbitrary JavaScript in the victim's browser context. - Tool Calling Exploitation: For future APIs like the browser's tool calling functionality (currently in developer preview), prompt injection could compel the model to execute specific tools. This could lead to severe consequences, such as in a ticketing system where a support staff member viewing an injected ticket detail could trigger malicious actions via the AI-powered application.
- Weaponization of the Local Inference Engine: The research revealed that the internal Chrome inference engine is not entirely bound to Google's ecosystem. Through reverse engineering and specific flags, it's possible to "free" this engine and load alternative, non-Google models (e.g., Cwen). This finding opens the door for AI-powered malware to leverage the pre-existing, on-device inference capabilities of Chrome, rather than relying on cloud-based AI services. This significantly complicates detection, as malware would no longer need to make easily identifiable outbound connections to public AI APIs (like Hugging Face or OpenAI).
- Enabling Sophisticated On-Device Malware: Building on the weaponization of the inference engine, the speakers explored the potential for advanced malware scenarios. They demonstrated how even current models like Gemini 3 could be used for credential-focused lateral movement, albeit with limitations. The model could detect passwords in files and extract relevant information. While Gemini 3 struggled with reliable command generation, the concept highlights that as models become more capable or are fine-tuned, they could autonomously perform complex tasks like post-exploitation, lateral movement, and data exfiltration entirely on the compromised endpoint, making traditional network-based detection methods less effective.
These key findings collectively paint a picture of a rapidly evolving threat landscape where the browser, once primarily a content consumption platform, becomes a powerful, yet potentially vulnerable, AI inference engine.
Technical Deep Dive
▶ Watch: Prompt injection bypasses Chrome's scam detector (10:00)
The technical underpinnings of Chrome's local AI capabilities and their vulnerabilities are intricate, stemming from the browser's internal architecture and the design choices made for integrating these models.
Chrome's local models, such as Gemini V3 and future Gemma 4 variants, are stored as a weights.bin file within the optimization_guide_model_store directory of the Chrome installation. This directory also contains protobuf files and TFLite classifiers that dictate how Chrome utilizes these models for various functions. These functions range from built-in features like enhancing history search and categorizing content for advertising, to supporting external Language Model JavaScript APIs for web developers.
The critical technical vulnerability identified lies in the permission model—or rather, its absence. Unlike sensitive hardware access (microphone, camera, GPS) which triggers explicit user prompts, the local AI APIs operate without any such consent mechanism. Furthermore, Chrome currently lacks any built-in rate limiting or throttling for the usage of these APIs. This design choice stands in stark contrast to how browsers have evolved to combat other resource-intensive abuses, such as in-browser crypto miners (e.g., CoinHive), which are now heavily throttled or blocked. The lack of these controls for local AI creates a silent, unmonitored resource pool for malicious actors.
The token mining botnet demonstrated by David Tulis leverages this oversight. A malicious website embeds JavaScript that, once loaded, enrolls the user's browser tab into the botnet. This JavaScript establishes an SSE (Server-Sent Events) connection to an admin panel. The admin panel, acting as a command-and-control server, then routes AI inference jobs—potentially sourced from an OpenAI API endpoint—to the connected Chrome browsers. Each browser executes the prompt using its local SLM, generating tokens that can then be sold or utilized by the attacker. The researchers provided benchmarks, estimating that an average node could generate around 30 tokens per second, translating to about 1 cent per hour or 26 cents per day, while higher-powered nodes like a Mac Metal laptop could reach 52 cents per day. These figures, though seemingly small per node, scale significantly in a botnet scenario, potentially outperforming CoinHive's peak earnings.
The prompt injection vulnerabilities are deeply technical. The Gemini V3 model, being relatively small, was found to be trivially easy to inject. For instance, in the context of Chrome's now-retired on-device scam detector, simply embedding instructions within a malicious webpage's text could trick the model into identifying a scam site as legitimate (e.g., claiming to be "Microsoft" with an intent to "offer support"). This output, if used as a signal for security decisions, could bypass defenses. More broadly, any web page or email using the local model's output in the innerHTML tag without proper sanitization becomes vulnerable to Cross-Site Scripting (XSS) if an attacker can inject malicious HTML/JavaScript into the model's response. The researchers also highlighted the severe potential of prompt injection combined with the upcoming browser's tool calling functionality. An injected model could be coerced to execute arbitrary tools or functions exposed by the browser or web application, leading to a much higher impact depending on the context.
Beyond exploiting the APIs, the researchers demonstrated how to "free" and weaponize the local model and inference engine. Chrome ships with an internal, non-open-source library containing the on-device inference engine. This library exports a function, getChromeMLAPIV2, which provides a function pointer table to create new inference sessions using Dawn, Google's open-source WebGPU implementation. To use this outside Chrome, one must compile the library oneself, ensuring the version precisely matches the one pinned in Google's Chromium source, which frequently changes. The researchers successfully reverse-engineered the expected model format (a Light RT format with a SentencePiece tokenizer) and demonstrated loading non-Google models like Cwen using the Chrome on-device library. Furthermore, they showed that the optimization_guide_manifest_override flag can be used to load alternative models directly within Chrome's APIs, simply by pointing to an override JSON file.
This capability to load external models locally is crucial for the concept of AI-powered malware. The speakers contrasted this with existing examples like Lame Hugs, a malware attributed to APT28 (Fancy Bear), which relied on remote inference from a Quen 2.9 model on Hugging Face, necessitating the inclusion of 248 API keys. This remote reliance makes Lame Hugs detectable via network egress. In contrast, leveraging Chrome's local inference engine allows malware to perform tasks like credential extraction (identifying hostname, username, password from files) and command generation entirely on the endpoint, making detection significantly harder. While Gemini 3 showed limitations in generating reliable post-exploitation commands (frequently defaulting to incorrect net exec commands), the underlying capability exists, and more advanced or fine-tuned models could overcome these limitations.
Demo / Proof of Concept
▶ Watch: Using Chrome's local model outside its ecosystem (12:00)
The core of the presentation was bolstered by practical demonstrations and conceptual proofs of concept that vividly illustrated the identified vulnerabilities.
The primary demonstration focused on the token mining botnet. David Tulis presented a simulated scenario where a user visits a seemingly innocuous website, such as a "sports stream" or "TikTok brain rot" site, designed to keep users engaged. In the background, malicious JavaScript embedded within the page silently enrolls the user's browser tab into a token miner botnet. This botnet operates by establishing a Server-Sent Events (SSE) connection to an attacker-controlled admin panel. The admin panel then dispatches prompts, potentially sourced from a legitimate OpenAI API, to the infected Chrome browsers. Each browser, leveraging its local AI model, performs the inference task and returns the generated tokens. While the full admin panel wasn't shown due to screen visibility issues during the live demo, the concept was clearly articulated.
To quantify the potential impact, the researchers provided conservative financial benchmarks for this token mining operation. Based on current cloud provider charges for similar-sized models (estimated at 10 cents per million tokens) and observed inference speeds (e.g., an average node generating 30 tokens per second), a single node could earn approximately 1 cent per hour or 26 cents per day. More powerful machines, like a Mac Metal laptop, could double this to 52 cents per day. While these individual figures might seem modest, the cumulative potential is significant. The speakers calculated that a streaming site could generate $22 for every 1,000 streams of a 1-hour TV episode. Scaling further, 10,000 websites, each with 1,000 visitors spending just 15 minutes, could collectively yield $55,000. This starkly contrasts with the heavily throttled and blocked crypto mining operations like CoinHive, which peaked at $24,000 weekly, suggesting that token mining could be a far more favorable and currently unmitigated revenue stream for attackers.
Another crucial proof of concept revolved around prompt injection vulnerabilities. The researchers illustrated how the Chrome on-device scam detector, which historically used a local model to evaluate web page text, could be easily bypassed. They showed a Microsoft tech support scam site where simple instructions embedded in the page's text could inject the Gemini V3 model. The model would then output that the "brand is Microsoft" and the "intent is to alert users of malware infections to offer support," effectively providing a false-positive signal to Chrome's Safe Browsing server. While Google has since evolved this feature to use cloud models and enhance its detection capabilities (including for click-fix scams), the demonstration served as a powerful reminder: never rely on local models for security decision-making, as their output is inherently vulnerable to manipulation.
The discussion extended to other theoretical but highly plausible prompt injection scenarios:
- XSS via Model Output: If a website uses the local language model's output in its
innerHTMLtag, an attacker could inject malicious HTML and JavaScript into the model's response, leading to XSS. - Tool Calling Exploitation: With the browser's tool calling functionality in developer preview, an injected model could be forced to call specific tools. For example, in an AI-powered ticketing system, an attacker could embed a malicious prompt in a ticket description. When support staff view the ticket, the local model could be injected to execute a harmful tool, posing a significant risk.
Finally, the concept of "freeing the model" was demonstrated through a technical explanation of how to extract and utilize Chrome's internal inference engine outside the browser. This involved leveraging the getChromeMLAPIV2 export from Chrome's internal library, which uses Dawn (WebGPU). The researchers confirmed that by understanding the expected Light RT format and SentencePiece tokenizer, they could load non-Google models like Cwen using Chrome's on-device library. Furthermore, they detailed using the optimization_guide_manifest_override flag to substitute models within Chrome itself. This technical proof of concept directly underpins the threat of AI-powered malware that operates entirely on-device, bypassing network-based detection.
Defensive Implications
▶ Watch: Q&A: CPU and memory impact of token mining (23:30)
The insights from "OH MODEL, WHERE ART THOU: Hacking Chrome’s Local SLM" present several critical defensive implications for both individual users and enterprise security teams navigating the evolving landscape of browser-embedded AI.
- Urgent Need for a Permission Model: The most immediate and significant defensive implication is the absolute necessity for browsers to implement a robust permission and approval model for local AI access. Just as users are prompted for camera, microphone, or location access, they should be informed and grant explicit consent for websites to utilize local AI resources. This granular control is crucial to prevent silent resource consumption and malicious inference. While the speakers expressed confidence that Chrome might eventually adopt such a model due to its early stage, the current lack thereof is a glaring vulnerability. This recommendation extends beyond Chrome to all browsers integrating similar local AI capabilities.
- Disregard Local Models for Security Decisions: Developers and security architects must adopt a fundamental principle: never rely on local models for security-critical decision-making. The demonstrated susceptibility to prompt injection means that any security feature leveraging local AI for signals (e.g., scam detection, content moderation, data classification) can be easily manipulated by attackers. Security logic must reside and be validated on trusted, server-side systems, or at the very least, any signals from local models must be treated as untrusted input and subjected to rigorous validation.
- Elevated "Shadow AI" Risk for Enterprises: The pervasive deployment of local AI models within browsers introduces a new dimension to "shadow AI" within corporate environments. Enterprises already struggle with unmonitored SaaS AI usage; now, every employee's browser can become an unmanaged AI inference engine. Security teams must expand their scope of monitoring and governance to include browser-level AI activities. This means understanding how to identify, monitor, and potentially control local AI usage on corporate endpoints.
- Leverage Enterprise Controls (Where Available): For enterprise environments, the speakers noted that Chrome offers enterprise controls to completely disable local AI features. While this provides a blunt instrument for risk mitigation, it often comes at the cost of legitimate functionality and user experience. The absence of granular controls (e.g., limiting usage to specific domains or applications) means that organizations must weigh the security benefits against potential productivity impacts.
- Re-evaluate Malware Detection Strategies: The shift from cloud-reliant AI malware (like Lame Hugs, which makes detectable connections to Hugging Face) to on-device AI-powered malware significantly complicates detection. Traditional network-based threat intelligence focusing on egress to known AI API endpoints will become less effective. Defenders need to pivot towards endpoint detection and response (EDR) solutions that can monitor for unusual local AI inference engine activity, unexpected model loading, or suspicious resource consumption patterns that might indicate token mining or on-device AI malware. However, the speakers noted that Chrome's current telemetry and logging for local AI usage are limited, with the
chrome://on-device-internalspage offering debug logs but not easily accessible enterprise-wide audit trails.
- Consider Resource Monitoring: While token mining might be less resource-intensive than crypto mining, it still consumes CPU, GPU, and memory. Users and enterprises should monitor system resource usage, especially for the browser process, for unexplained spikes that could indicate unauthorized AI inference. However, attackers can implement throttling to keep usage below noticeable thresholds, making detection challenging.
- User Awareness and Education: End-users need to be educated about the new risks associated with browser-embedded AI. Understanding that seemingly harmless websites can silently leverage their computer's AI capabilities can empower them to be more cautious about the sites they visit and extensions they install. The possibility of malicious browser extensions conducting token mining even when a user is not actively on a specific page (just having the browser open) highlights a particularly insidious threat.
In essence, the arrival of local browser AI mandates a proactive and comprehensive re-evaluation of security postures, moving beyond traditional web security paradigms to embrace the complexities of on-device machine learning.
Key Takeaways
- Permission Model is Paramount: Browsers integrating local AI models, particularly Chrome, critically lack a user permission and approval model. This absence allows malicious actors to silently exploit user resources for AI inference (token mining) without consent or throttling, necessitating a robust permission system similar to camera or microphone access.
- Local Models Cannot Be Trusted for Security: Any security feature or decision-making process relying on the output of local AI models is inherently vulnerable to prompt injection. This risk was demonstrated with the former Chrome scam detector and extends to potential XSS and tool-calling exploits, emphasizing that security-critical logic must reside on trusted, server-side systems.
- New "Shadow AI" Frontier: Browser-embedded AI introduces a significant "shadow AI" challenge for enterprises. Organizations must expand their security monitoring and governance frameworks to identify and manage local AI usage on endpoints, as browsers now represent unmanaged AI inference engines.
- Token Mining is a Viable Threat: The economic viability of token mining, akin to crypto jacking but currently unmitigated by browser controls, presents a lucrative new avenue for attackers. With Chrome's vast market share, the infrastructure for large-scale token botnets is already in place.
- Weaponized Local Inference for Malware: The ability to "free" Chrome's internal inference engine and load arbitrary models enables a new generation of AI-powered malware. This malware can perform complex tasks like credential extraction and lateral movement entirely on-device, making detection significantly harder as it bypasses traditional network-based monitoring of egress to cloud AI services.
- Future Risks with Tool Calling and Distributed Inference: The combination of prompt injection with upcoming browser tool-calling functionalities poses severe risks, potentially allowing attackers to trigger arbitrary actions. Furthermore, the possibility of distributed inference across botnet nodes could enable the running of frontier-like models, dramatically increasing the capabilities of on-device AI threats in the near future.
About the Speaker(s)
Vincenzo Ciancaglini is the AI Threat Research Lead at TrendAI. His work focuses on understanding and mitigating the security risks emerging from the integration of Artificial Intelligence into various technologies, particularly within consumer devices and web browsers.
David Tulis is a Senior Threat Researcher at TrendAI. He collaborates with Vincenzo Ciancaglini on cutting-edge research into AI-driven threats, with a focus on practical exploitation techniques and uncovering vulnerabilities in new AI deployments.
The speakers also extended special thanks to their colleagues Vladimir Kropotov, Fyodor Yarochkin, and Kirill Gelfand, who contributed to the research but could not be present. They noted that these individuals are active within the [un]prompted community.
Reviews
→ Top-rated talks at [un]prompted II 2026 — The AI Security Practitioner Conference
All talks from [un]prompted II 2026 — The AI Security Practitioner Conference