Databricks: LLMs miss binary npm malware, inference-time expertise helps
Databricks published research on LLM triage of malicious npm packages, based on samples collected since November 2025: of 11,413 package-versions corroborated through OSV malware advisories, 96.2% hid payloads in source or fetched them externally, while 3.8% (432) bundled a binary. The authors report that binary-bearing packages fail to reach a decisive malicious verdict more than twice as often as source-only ones (14.4% vs 6.2%), and describe failure modes including dismissal, hedging, confabulation and lower assigned severity for more heavily obfuscated payloads. They propose injecting pre-computed static evidence and domain knowledge at inference, which they say improves detection quality for both budget and frontier models.
Binary-bearing npm packages are rare but disproportionately hard for LLM triage pipelines, and the reported failures span model tiers, making the proposed inference-time domain-knowledge injection relevant to AI-assisted supply-chain security.
Introduction
Supply chain attacks on package registries have grown in volume and sophistication [1]. Public research regularly observes malware being deployed to the npm registry by a range of threat actors, from spam campaigns [2] to the steady proliferation of DPRK malware [3, 4, 5], and to the high-impact TeamPCP in 2025 and 2026 [6, 7], with the DPRK and TeamPCP actors having a track record of successfully compromising widely used open source projects for maximized downstream reach [8].
To study this problem directly, we have been collecting npm malware samples since November 2025, and observed that, among the 11,413 package-versions we scanned and corroborated through OSV npm malware advisories [9], most malware on the npm registry hides its payload in the package source or fetches it from an external server, accounting for 96.2% of the corroborated dataset. The remaining 3.8%, 432 package-versions, bundle a binary. Though small in volume, they can carry disproportionate risk during triage. A stripped, opaque binary that carries no source for tools to read can be nested within a facade of clean source and metadata and potentially skew an LLM towards a benign verdict.
#Databricks#npm#OSV#YARA#Semgrep#Qwen3-Next#GPT-5.4-nano#Gemini#Haiku