_research / nkabuse-marimo-hugging-face-supply-chain-attack
RESEARCH ANALYSIS 7 min read PREMIUM

NKAbuse Resurfaces: How a Python Notebook Flaw Turned Hugging Face Into a Malware Delivery Network

Attackers are exploiting a critical Marimo vulnerability to deploy NKAbuse malware directly from Hugging Face Spaces, weaponizing trusted AI infrastructure against enterprise targets.

2026-04-17 · Source: Bleeping Computer
🔬
RESEARCH ANALYSIS

This analysis is based on research published by Bleeping Computer. CypherByte adds analysis, context, and security team recommendations.

Original research reported by Bleeping Computer. CypherByte analysis and perspective by our Senior Research Team.

Executive Summary

A newly documented attack campaign has combined two developments that, in isolation, might have seemed unrelated: a critical vulnerability in Marimo, the reactive Python notebook framework gaining traction across data science and AI research teams, and the resurgence of NKAbuse, a sophisticated Go-based malware family with blockchain-based command-and-control capabilities first identified in late 2023. What makes this campaign particularly alarming is not just the malware itself — it is the delivery mechanism. Threat actors are staging NKAbuse payloads directly on Hugging Face Spaces, exploiting the platform's reputation as a trusted, legitimate hub for AI models and datasets. For organizations that have whitelisted Hugging Face domains in their security perimeters — a common practice in enterprises running machine learning pipelines — this attack effectively turns institutional trust into an attack vector.

Security teams responsible for data science infrastructure, MLOps environments, and any organization that has adopted reactive notebook tooling should treat this as an active threat requiring immediate attention. The intersection of AI tooling adoption and enterprise security posture is rarely scrutinized with the same rigor applied to traditional software stacks. This campaign exploits precisely that gap. Defenders, threat hunters, and platform security engineers at organizations deploying Marimo or consuming resources from Hugging Face should review this analysis in full and act on the indicators and recommendations provided below.

Technical Analysis

The attack chain begins with exploitation of a critical vulnerability in Marimo, an open-source reactive Python notebook designed as a modern alternative to Jupyter. Unlike traditional notebooks, Marimo's reactive execution model automatically re-runs dependent cells when upstream state changes — a powerful feature that, when combined with an unpatched flaw in how the framework handles certain inputs or execution contexts, creates an opportunity for arbitrary code execution. While the specific technical mechanics of the vulnerability are still being fully characterized, the exploitation appears to enable an attacker to trigger malicious code execution within the notebook's runtime environment, which in many deployment scenarios runs with elevated privileges or broad network access.

Once initial code execution is achieved, the attack pivots to a payload retrieval stage that is notably sophisticated. Rather than pulling binaries from attacker-controlled infrastructure — domains that would be flagged by threat intelligence feeds and DNS filtering solutions — the malware fetches the NKAbuse payload from a repository or Space hosted on huggingface.co. This is a deliberate evasion strategy. Hugging Face's CDN and domain infrastructure carries a high trust reputation score across virtually every commercial threat intelligence platform, and many enterprise firewall policies explicitly permit traffic to and from Hugging Face endpoints to support legitimate ML workflows. The payload, disguised or embedded within what appears to be a legitimate-looking hosted artifact, is downloaded and executed within the compromised environment.

Key Finding: NKAbuse uses the NKN (New Kind of Network) blockchain protocol for command-and-control communications. This means C2 traffic does not resolve to a traditional IP address or domain — it routes through a decentralized peer-to-peer network, making traditional network-layer C2 detection and blocking highly ineffective against this malware family.

NKAbuse itself is a dual-capability implant written in Go, compiled for cross-platform execution. Its primary documented capabilities include DDoS attack facilitation — the implant can be tasked to participate in volumetric flood attacks — and RAT (Remote Access Trojan) functionality, enabling file system access, command execution, screenshot capture, and persistence establishment on the infected host. The use of Go as the implementation language makes cross-compilation trivial for threat actors, allowing a single codebase to produce Linux, Windows, and macOS binaries with minimal modification. In the context of Marimo deployments, which commonly run on Linux-based servers or containerized cloud environments, the Linux variant is the most immediately relevant.

The NKN-based C2 architecture deserves particular emphasis. NKN is a legitimate, publicly available blockchain network protocol designed for decentralized communication. Each NKAbuse-infected node communicates with its controllers through NKN's peer-to-peer relay infrastructure, meaning the malware generates no DNS queries to attacker-owned domains and establishes no direct TCP connections to known malicious IPs. Standard network monitoring stacks that rely on domain reputation, IP blacklists, or flow analysis looking for connections to suspicious autonomous system numbers will largely fail to identify this C2 channel.

Impact Assessment

The affected attack surface is broader than a simple "patch your notebooks" advisory suggests. Any organization running Marimo in an internet-accessible or internally networked deployment is potentially exposed, particularly where notebook servers are accessible without strict authentication controls — a configuration that is unfortunately common in research and data science team environments that prioritize ease of access over security hardening. Cloud-hosted instances, containerized deployments in Kubernetes clusters, and developer workstations running Marimo locally with network-accessible ports are all within scope.

Beyond direct Marimo exploitation, this campaign highlights a systemic risk affecting the broader ML/AI tooling ecosystem. The weaponization of Hugging Face Spaces as a payload distribution point has real consequences: it poisons the trust model that data science teams depend on. Organizations that have built automated pipelines that pull models, datasets, or notebook dependencies from Hugging Face cannot simply revoke that trust wholesale without disrupting legitimate operations. Threat actors understand this operational constraint and are explicitly exploiting it. The real-world consequence is malware deployment within environments that frequently have access to sensitive training data, proprietary model weights, internal APIs, and cloud provider credentials stored as environment variables.

Risk Amplifier: Data science and MLOps environments frequently store cloud credentials, API keys, and database connection strings as environment variables or in configuration files accessible to the notebook runtime. A successful NKAbuse deployment in these environments represents not just a compromised host, but a potential credential harvesting event with lateral movement implications across cloud infrastructure.

CypherByte's Perspective

This campaign is a clear signal that the security industry's traditional perimeter between "developer tooling" and "production security concerns" is no longer operationally valid. The rapid adoption of AI and data science tooling in enterprise environments has outpaced the security review processes that would normally govern production software deployment. Marimo, like Jupyter before it, is extraordinarily powerful software that was designed with researcher productivity as the primary objective. Security hardening was, understandably, a secondary consideration. But as these tools migrate from individual laptops into shared servers, cloud environments, and automated pipelines, their attack surface becomes enterprise-grade without the accompanying enterprise-grade security controls.

The Hugging Face angle is the more strategically significant finding here. We are observing a maturing tactic: threat actors are increasingly identifying trusted platforms within specific industry verticals — platforms that defenders have implicitly or explicitly approved — and using them as staging infrastructure. We have seen analogous patterns with GitHub, Google Drive, Discord CDN, and now Hugging Face. The lesson is consistent: domain reputation is not payload reputation. Security teams must evolve detection strategies beyond domain-level trust and invest in behavioral analysis, content inspection of downloaded executables regardless of source, and runtime anomaly detection within notebook and ML pipeline environments.

Indicators and Detection

Defenders should prioritize the following detection opportunities given the limitations of traditional network-layer monitoring against NKN-based C2:

Network-Level Indicators: Monitor for outbound connections to NKN network infrastructure from hosts running Marimo or notebook servers. NKN client traffic operates over TCP port 30001 and uses websocket connections to NKN seed nodes. Unexpected NKN protocol traffic from server or cloud workloads should be treated as high-priority anomalous behavior. Additionally, flag any downloads of executable content (ELF binaries, PE executables) originating from huggingface.co domains where the request originates from a server process rather than a user browser session.

Host-Level Indicators: Look for Go-compiled binaries dropped in temporary directories (/tmp, /dev/shm) or disguised with misleading filenames. NKAbuse establishes persistence through cron jobs or systemd service creation. New scheduled tasks or services created around the time of Marimo server activity should be investigated. Process trees spawned from Marimo's runtime process (marimo or underlying uvicorn/python processes) that include shell invocations, curl/wget calls, or execution of downloaded binaries are strong indicators of exploitation.

Detection Note: Given NKAbuse's use of NKN for C2, behavioral EDR telemetry and process-level monitoring will be significantly more effective than network IOC matching for identifying active infections. Prioritize endpoint visibility on Marimo-hosting systems.

File Hashes and Artifacts: Security teams should consult the Bleeping Computer source report and cross-reference emerging threat intelligence feeds for specific NKAbuse variant hashes associated with this campaign. Given the Go cross-compilation capability, hash-based detection alone is insufficient — behavioral signatures are essential.

Recommendations

1. Patch or Isolate Marimo Immediately. Organizations running Marimo should check for available security updates and apply them immediately. If updates are unavailable or cannot be applied promptly, isolate Marimo instances from public network access and enforce strict authentication on all notebook server endpoints. Treat any unpatched public-facing Marimo deployment as potentially compromised and conduct forensic review.

2. Implement Content Inspection on Hugging Face Traffic. Do not rely solely on domain reputation for traffic to or from huggingface.co. Where possible, deploy SSL inspection on this traffic and alert on any downloaded content that includes executable file formats. Consider logging all download activity from AI platform domains for retrospective analysis.

3. Audit Notebook Runtime Permissions. Review what privileges Marimo and other notebook servers run with. Apply the principle of least privilege: notebook processes should not have access to cloud provider metadata endpoints, SSH keys, or production credentials. Use secrets management solutions rather than environment variables for sensitive credentials in notebook environments.

4. Deploy NKN Protocol Detection. Work with network security teams to identify and alert on NKN client traffic patterns originating from server workloads. This traffic is anomalous in virtually any enterprise context outside of deliberate blockchain/NKN development work and should be treated as a high-fidelity indicator of NKAbuse infection.

5. Extend Threat Hunting to ML Infrastructure. If your organization has not formally included data science infrastructure — notebook servers, ML pipeline runners, model serving endpoints — in your threat hunting and EDR coverage scope, this campaign is a clear mandate to do so. The security risk profile of these systems is equivalent to any other internet-accessible server, and they should be monitored accordingly.

CypherByte will continue monitoring this campaign for updated indicators, additional Marimo vulnerability details, and new NKAbuse variant activity. This analysis will be updated as new information becomes available. Original reporting credit: Bleeping Computer.

// TOPICS
#research#analysis
// WANT MORE LIKE THIS?

Get full access to all research analyses, deep-dive writeups, and premium threat intelligence.