CS Paper Radar

LoRA-Patch: Defending Against Backdoored LoRA Adapters via Directional Steering

Shengyan Huo, Peihai Jiang, Xixiang Lyu, Yige Li

cs.CR cs.AI ·submitted 2026-11-02 08:44 UTC · v1
top venuecode/data

Abstract

Third-party LoRA adapters introduce serious backdoor risks: malicious adapters can maintain normal task performance while embedding hidden, trigger-activated behaviors, making them difficult to detect through standard utility evaluations. Existing removal-based defenses typically sanitize backdoored models by updating, pruning, distilling, or mixing model parameters. However, these approaches are misaligned with adapter-based deployment, where the trusted base model is expected to remain frozen. In this work, we propose LoRA-Patch, a lightweight backdoor defense tailored to LoRA adapters. Our key insight is that backdoor injection distorts the directional geometry of a poisoned adapter relative to its trusted base model. Building on this insight, LoRA-Patch suppresses trigger-activated behaviors by realigning adapter directions through layer-wise steering, without modifying the base model weights. Extensive experiments across five backdoor attacks and three models show that LoRA-Patch effectively mitigates trigger-activated backdoors, outperforming existing baselines while preserving benign task performance. Moreover, LoRA-Patch is computationally efficient, constructing patches within 20 seconds across all evaluated models and adapters. Our code is publicly available at https://github.com/FOXVEDA/LoRA-Patch.

Closest papers

Nearest neighbours by meaning across the whole index.

AnchorRep: Defending LLMs Against Cross-Model Adversarial Transfer via Representation Repulsion

cs.LG cs.AI ·2026-09-26 ·Gal Wertheizer, Rom Himelstein, Tomer Peretz, Avi Mendelson
publishedcode/data similarity 0.72
Abstract · NeurIPS 2026; Code, configs and logs: https://github.com/galwert/AnchorRep

Adversarial attacks optimized on a single open-weight LLM can transfer to and jailbreak architecturally different models, allowing an attacker with white-box access to one model to compromise independently deployed systems. This creates a shared vulnerability across models, yet existing defenses are not designed for this cross-model threat. We find that cross-model transfer aligns with shared internal representation geometry, making it a natural defense target. AnchorRep targets this geometry directly with a lightweight LoRA adapter that pushes the defended model's internal representations of harmful prompts away from those of a frozen anchor model on the same prompts. Training uses a small set of harmful prompts and no adversarial examples. Across five models and four architectural families, AnchorRep reduces cross-model attack success rate to <=1.1% on 2,000 transferred attacks (0% on two), including the largest drop on Mistral (36% -> 1.1%). Existing defenses can reduce transfer, but only at high cost either inducing up to 77% degenerate benign output or increasing over-refusal by up to 18%. Because such degenerate benign outputs are not captured by standard refusal-based metrics, we introduce the Benign Garble Rate to quantify them. Our results suggest that cross-model robustness can be achieved by shaping representation geometry, without requiring attack-specific training

0.35

Suppression Is Not Erasure: Mechanistic Analysis and Reactivation Boundaries of Subspace Projection for LoRA Backdoor Defense

cs.CR ·2026-11-09 ·Junsheng Fu, Shuangshuang Gao
theory similarity 0.69
Abstract · 29 pages, 7 figures, 12 tables

Low-Rank Adaptation (LoRA) is widely used to customize large language models, but third-party adapters create supply-chain backdoor risks with under 1% modified parameters. Recent analytical null-space and subspace projection defenses report near-zero static Attack Success Rates (ASR), equating static silence with erasure. We audit subspace-projection defenses across four scales (Qwen2.5-0.5B/1.5B/3B/7B), three architectures (Qwen2.5, InternLM2.5-1.8B, Spark-X2.6-4B), and five trigger families (suffix, natural phrase, prefix/in-sentence, double-negation syntax, and composite triggers). Statically, module-wise rank-1 trigger-difference projection cuts ASR from 60.4% to 0.0% on standard suites and 70.3% to 0.0% on 1,000 uncontaminated prompts (p = 3.055e-299) in under 5 s. By Theorem 1 (11,880/11,880 module-sample pairs), low-rank bottleneck amplification aligns benign polite-suffix probes with u_1(B) (median cosine 0.8934-0.9705), reaching 0.0% ASR without trigger knowledge. However, static suppression is not erasure. Under 5-sample reactivation, single-round weight-editing baselines rebound to 91.7%-100.0% ASR in Epoch 1 (Fine-Pruning, ANP, NEEDLE, LoRA-Patch; 48.7% for single-round dual projection) and 100.0% by Epoch 2. Theorem 2 and Corollary 1 prove single-sided projection leaves non-zero gradients along u_1 across 168/168 modules (27.2x-31.1x above random expectation), while Haar orthogonal rotation shows Epoch-2 immunity depends on semantic alignment rather than Frobenius norm. Guided by Theorems 1-2, we propose Single-Shot Rank-k Dual-Subspace Erasure (DSE) and Benign Subspace Anchoring (DSE-BA), achieving 0.0% static ASR and 0.0% Epoch-1 reactivation across all five trigger families and Qwen2.5-0.5B/1.5B, while cutting Epoch-2 ASR to 25.0% (43.33% +/- 2.49% on 50 prompts x 3 seeds) and benign PPL to 6.54.

0.46

Beyond Prompt Injection: The Tool Update Gap in LLM Agent Security

cs.CR cs.AI ·2026-11-01 ·Shiyu Kan, Yue Qi, Yufei Han, Xinjian Luo, Guojun Xiong +1 more
code/data similarity 0.69
Abstract · 12 pages, 5 figures

Large language model based agents increasingly rely on external tools to invoke services and interact with web resources. These tools can evolve through software updates, yet agentic frameworks may continue trusting them without re-verifying their safety after implementation changes. This tool update gap creates a supply-chain vulnerability in agentic systems: because updated tool code executes outside the LLM's context window, malicious functionality embedded in tool updates can bypass defenses centered on model-visible interactions, leaving agents exposed to stealthy, persistent threats that existing in-context defenses can hardly address. To thoroughly investigate this threat, we introduce ETUDE (Exploiting Tool Updates for Direct Execution), an attack that embeds malicious functionality into updates of initially benign tools to produce compromised tools, while preserving their legitimate tool functionality. Unlike prompt-based attacks, ETUDE operates entirely outside the LLM's context and requires no adversarial instructions, thereby bypassing defenses restricted to model-visible content. We evaluate ETUDE across three representative attack workloads and seven widely used commercial and open-source agentic frameworks, including Gemini CLI, Codex CLI, and Claude Code. The results show that ETUDE achieves a 97.6% ASR while maintaining a 95.9% legitimate task completion rate. We further examine existing defenses and find that they provide insufficient protection against this threat. These findings expose a fundamental blind spot in current agent security practices: trust established for a tool does not necessarily remain valid after its implementation updates.

0.26

A Blind Trust, the Bloody Thrust: When Attacker-Controlled Hook Updates Steer AI Agent Harnesses towards Malicious Behaviors

cs.CR cs.AI ·2026-09-03 ·Pengxun Li, Litian Zhang, Jianwei Hou, Shujiang Wu, Song Li +2 more
code/data similarity 0.68
Abstract · 18 pages, 8 figures

Modern AI agent harnesses expose lifecycle hooks that bind shell commands to runtime events such as session start, tool calls, and file edits. These commands run with host privileges yet ship as lifecycle-hook configuration and may fire at times the LLM never observes. We identify the lifecycle-hook update path, which harnesses trust blindly, as a new attack surface. Under a supply-chain threat model in which an attacker controls only plugin metadata and lifecycle-hook configuration, a benign versioned plugin can be trojanized by an update that silently binds attacker-chosen commands to benign events, yielding malicious host-side behavior such as privilege escalation. We propose HookPry, an open-source and fully automated attack framework that systematically exploits this vulnerability across heterogeneous AI agent harnesses. HookPry realizes ten attack objectives; across 25 combinations of harnesses and backends in 1,000 end-to-end runs, it compromises all seven evaluated harnesses, with per-harness success rates reaching 92.5%. Representative defenses remain insufficient: Microsoft Defender has 0% recall, and the union of three static defenses misses 47.5% of malicious artifacts.

0.28

Conjunctive Poisoning in AI Supply-Chain Applications

cs.CR ·2026-08-16 ·Nokimul Hasan Arif, Qian Lou, Mengxin Zheng
code/data similarity 0.68
Abstract

Large Language and Vision-Language Models are increasingly deployed through inference pipelines that include prompt wrappers (e.g., templates and post-processing scripts) and configuration metadata (e.g., JSON/YAML files) that together shape model outputs. While model weights and binaries are routinely verified, these textual deployment artifacts remain weakly protected despite directly influencing runtime behavior. We show that a malicious developer can pair a benign-looking wrapper with crafted metadata to deterministically alter post-generation behavior without modifying model weights, training data, or inference backend. We study this behavior through a controlled conjunctive-gate implementation, where activation depends on both an embedded wrapper marker and cryptographically bound metadata. We evaluate the attack across fifteen open- and closed-source LLM/VLM deployments, and assess prompt and system level defenses including static metadata inspection, wrapper scanners, PromptShield, and SigStore-based artifact signing. To mitigate this risk, we introduce TIF-BAH, a lightweight middleware defense that verifies wrapper integrity and records behavioral attestations during inference. Our results reveal that wrapper-metadata interactions form an under-protected execution layer in modern AI deployments, exposing a deployment-time behavioral risk that is not captured by model-weight or prompt-level defenses. Code is available at https://github.com/N-H-Arif/llm_temp.

0.57

Hijacking a Trusted LLM in Real-World Quantized Deployments Only Requires a Disguised Adapter

cs.CR ·2026-11-11 ·Jiayang Li, Tianqing Zhu, Huan Huo, Heng Xu, Shang Wang +1 more
similarity 0.68
Abstract · submitted to IEEE Transactions on Information Forensics and Security

Third-party low-rank adaptation (LoRA) adapters are tailored to perform decision tasks such as content moderation and function selection. However, in the real world, quantized deployments carry a potential threat in that an adapter can pass an audit with the unquantized base, yet hijack decisions when the same base is quantized for deployment. Demonstrating this threat requires an adapter that preserves benign behavior before quantization, but hijacks decisions afterward. Further, this must hold without modifying the trusted base or knowing the victim's quantization configuration. We therefore present QHijack-LoRA, an adapter-only attack that uses the base model's natural quantization residual to activate decision hijacking. The attacker modifies neither the trusted base model nor the victim's quantization configuration. With QHijack-LoRA, a four-objective training procedure separates full-precision dormancy from quantized target activation, while preserving clean-input behavior. The adapter is trained across several different quantization methods, while adaptive reweighting and residual-direction augmentation extend the attack to unseen configurations. Our results show that auditing performed exclusively under full-precision conditions does not provide assurance of decision integrity in quantized deployment environments. Thus, we also propose a cross-precision paired audit that checks the candidate adapter in its intended deployment configuration. This work shows the critical need to audit third-party adapters in any potential quantized deployment.

0.25

Backdoor Containment via Expert Quarantine and Shutdown in LLMs

cs.AI cs.CRcs.LG ·2026-09-30 ·Jianwei Li, Min-Seon Kim, Jung-Eun Kim
published similarity 0.67
Abstract · NeurIPS 2026

Backdoored large language models (LLMs) can behave normally on benign inputs while producing attacker-specified outputs under hidden triggers. Existing defenses span four stages---prior-training, in-training, post-training, and inference-time---and share one of two underlying strategies: either suppress backdoor learning (by filtering poisoned data or interrupting its acquisition during optimization) or learn, then purify (by repairing model weights or gating inputs after a fully backdoored model has formed). We propose a third strategy, learn, but channel: allow backdoor formation during training but route it into a designated, quarantined component that can be disabled at deployment. To this end, we propose Quarantined Expert Shutdown QES, a computationally efficient containment strategy built in a regularization-steered MoE-like setting. Specifically, given a poisoned dataset, QES augments a Transformer-based language model with routed expert-specific LoRA branches and lightweight routers, and uses auxiliary routing objectives to attract trigger-conditioned behavior into a designated expert while preserving benign capability elsewhere. At deployment, mitigation reduces to a single constant-time operation: zeroing the quarantined expert's routing weight, without trigger screening or further updating model weights. Empirically, our methods reduce the attack success rate (ASR) from 100% to 0-10% on most settings across two tasks, three attacks, and four model families, while downstream utility is often preserved or only modestly affected. These results establish learn, but channel as a previously unexplored regime for backdoor containment in generative LLMs.

0.45

Backdoor Purification for LoRA-Tuned LLMs via Null-Space Projection

cs.AI cs.CRcs.LG ·2026-09-30 ·Jianwei Li, Jung-Eun Kim
published similarity 0.67
Abstract · NeurIPS 2026

With the rapid adoption of large language models (LLMs) and parameter-efficient fine-tuning (PEFT) methods, the risk of backdoor attacks has become more severe. Existing backdoor purification methods typically rely on at least one of the strong assumptions, such as prior knowledge of triggers, access to clean references, or aggressive retraining, and they often lack comprehensive evaluations. These constraints substantially limit their practical applicability. To overcome these challenges, our work proposes purifying LoRA-tuned LLMs without these assumptions and even without post-hoc retraining of the suspect parameters. Our objective is to significantly reduce the attack success rates (ASR) while preserving both (i) the base model's general capabilities and (ii) the new downstream skills learned through the adapter. Through a series of examinations, we progressively scale our approach from a single layer in a text classification setting to a full-parameter LLM in the generative task. Through careful data curation and feature approximation, we extract high-fidelity backdoor directions and, for each layer or head, construct orthogonal null spaces in both the input and output channels, onto which the LoRA updates are projected. Empirically, our null-space projection method reduces the ASR from nearly 100% to less than 10%, while preserving the base model's benign performance and the adapter's learned abilities during downstream task adaptation.

0.45