Source-linked AI summary

Encrypted Skills Can Become New Security Exploits If AI Agents Know How to Decipher

Yan-Lun Chen, Pin-Yu Chen, Chia-Mu Yu

arXiv:2610.18262v1cs.CRcs.AIcs.CL

TL;DR

Third-party skills can carry encoded malicious instructions, raising the question of whether agents will recover and act on them. The paper evaluates Caesar and layered Ciphered Skill Injection across agentic models, finding that recovery does not ensure attack success and that outcomes vary; the main experiments use shortened skills, which limits how far results extend to unmodified skills.

  • Problem

    Third-party skills can expose agents to encoded malicious instructions, and the paper examines whether agents recover and follow them.

    Source: §1 · p. 1
  • Method

    The paper evaluates Caesar and layered Ciphered Skill Injection across models, measuring instruction recovery separately from subsequent attack behavior.

    Source: §1 · pp. 1–2, §4.1 · p. 4
  • Results

    Layering and auxiliary decryption skills do not consistently determine attack outcomes, and agents differ in whether they act on recovered instructions.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Evaluating encoded skill content requires attention to both instruction recovery and the agent’s subsequent behavior.

    Source: §1 · p. 2, §6 · p. 8

    The main experiments use shortened skills, and the results may not extend to unmodified third-party skills because shortening also changes wording and organization.

    Source: §7 · pp. 8–9

Abstract

from arXiv · show

Third-party skills can expose LLM agents to malicious instructions hidden by encoding. We introduce Ciphered Skill Injection (CSI), which embeds such instructions in skill files for agents to decode and follow. We evaluate Caesar and layered variants across eight models and 139 injection-task pairs, separating instruction recovery from attack success. In the primary setting with shortened skills, the variants achieve attack success rates of up to 47.5% and 40.3%, respectively. Successful decoding does not guarantee attack success, and layering has model-dependent effects. The tested skill scanners rarely flag injected skills. These findings highlight the risk of promoting decoded, untrusted content into actionable instructions.

1 Introduction

Ciphered Skill Injection (CSI) examines whether agents recover encoded malicious instructions in third-party skills and then act on them. The introduction reports that recovery and execution are distinct, with outcomes varying across models and attack constructions.

1 Introduction

  • Third-party skills distributed through public repositories or marketplaces can carry malicious instructions that an agent may follow while completing a legitimate task.CSI findings support assessing both instruction recovery and downstream behavior when evaluating agents that use third-party skills.Source: §1 · pp. 1–2
  • An agent recovering an instruction is not sufficient for an attack: it must also treat text from an untrusted skill as an instruction and follow it.The paper examines recovery and subsequent behavior as distinct stages.Source: §1 · p. 1
  • CSI embeds encoded attack instructions in skill files and evaluates Caesar and layered variants across eight agentic models and different decryption resources and payload ciphers.Successful attacks occur across multiple constructions, and some models show substantial gains from layering.Source: §1 · pp. 1–2
  • Neither added encryption layers nor an auxiliary decryption skill consistently determines attack outcomes; open-weight agents differ in acting on recovered instructions, and refusal interruptions do not eliminate successful attacks.The findings motivate evaluating instruction recovery separately from subsequent behavior.Source: §1 · p. 2

2 Related Work

Prior work studies readable skill injections, malicious code, and risks from skill composition. CSI focuses instead on ciphered natural-language instructions embedded in skill documents and measures both recovery and subsequent behavior.

2 Related Work

3 Ciphered Skill Injection (CSI)

CSI models an attacker who modifies a task-relevant skill to induce an extra action during a legitimate task. Its Caesar and layered constructions encode attack instructions, while leaving agents to determine whether to decode and follow them.

3.1 Threat Model

  • The attacker modifies a task-relevant skill but does not control the user request or higher-priority instructions; success requires reading, recovering, and acting on the injected instruction.Ciphertext and decoding resources are separated across skills, so a scanner examining each skill alone may miss how their contents combine during execution.Source: §3.1 · pp. 2–3

3.2 Caesar CSI

  • Caesar CSI shifts the attacker-desired instruction by a fixed alphabet offset, with a separate skill providing recovery guidance in the primary setting.A separate experiment removes that skill to test whether agents can infer the inverse shift; recovery alone does not achieve the attack objective.Source: §3.2 · p. 3

3.3 Layered CSI

  • Layered CSI encrypts the final instruction with a selected method and password, then Caesar-encodes an intermediate instruction naming the decryption skill and supplying the password.The agent must recover and follow that intermediate instruction, invoke the decryption script, and then treat the returned plaintext as an instruction; the script itself does not execute it.Source: §3.3 · p. 3

4 Evaluation

The evaluation tests Caesar and layered Ciphered Skill Injection across agent models, measuring legitimate task completion, instruction recovery, and attack behavior separately. Attack success varies across models and constructions, and the effects of layering are not uniform.

4.1 Setup

  • The evaluation uses 139 injection–task pairs across 23 target skills, preserves user prompts, and tests four open-weight and four closed-source models.Target skill files were shortened, and Layered CSI used AES-256-CBC, ChaCha20-Poly1305, or XSalsa20-Poly1305 payload skills.Source: §4.1 · p. 4
  • TCR measures legitimate task completion; DAR and DSR track decryption attempts and complete recovery, while AAR and ASR track attempted and successful attack actions.The evaluation also reports attack success conditional on at least one complete decryption.Source: §4.1 · p. 4

4.2 Results

  • Muse-Glimmer-30B records 47.5% ASR under Caesar CSI, while Gemma-4-31B records the highest Layered CSI ASR at 40.3%.Layered CSI results use AES for the final encrypted payload.Source: Table 1 · p. 5, §4.2 · p. 5, Table 2 · p. 5
  • 47.5% Caesar ASR for Muse-Glimmer-30B contrasts with Qwen3.8-27B’s 78.4% DSR but only 7.9% AAR and 5.8% ASR; closed-source models also differ in acting after recovery.Claude-Haiku-5.5 and Claude-Sonnet-5.5 have similar DSRs but ASRs of 1.4% and 20.1%, respectively.Source: §4.2 · p. 5
  • Table 4 reports Layered CSI results using ChaCha20-Poly1305 and XSalsa20-Poly1305 for the final encrypted payload.Source: Table 4 · p. 5
  • Across eight models, Layered CSI increases ASR for three and decreases it for five; GPT-6-Sol rises from 11.5% to 29.5%, while Claude-Sonnet-5.5 falls from 20.1% to 2.2%.The comparisons describe observed rates and do not isolate layering alone.Source: §4.2 · pp. 5–6
  • For GPT-6-Sol, Layered CSI raises overall ASR while cASR falls from 44.4% to 31.3%, alongside an increase from 36 to 131 full-decryption cases.The results distinguish the frequency of complete recovery from attack success after recovery.Source: Table 3 · p. 5, §4.2 · p. 6

5 Discussion

The discussion finds that CSI outcomes vary with encryption setup, agent behavior, skill length, and access to decoding skills. It also reports that tested scanners rarely flag CSI-injected skills and cautions that related attacks use different settings.

5.1 Different Encryption Methods in Layered CSI

  • 14.4% ASR with XSalsa20-Poly1305 versus 7.2% with AES or ChaCha20-Poly1305 for Gemma-4-26B-A4B; no encryption method consistently performs best.The authors also note that post-recovery behavior matters, and differences cannot be attributed solely to cryptographic algorithms because skill descriptions and scripts vary.Source: §5.1 · p. 6

5.2 CSI Without the Caesar-Cipher Skill

  • Without the Caesar skill, Muse-Glimmer-30B retained 46.0% ASR under a generic cue, while Gemma-4-31B fell from 31.7% to 13.7%.In Layered CSI, removing that skill left Muse-Glimmer-30B’s ASR similar (36.7% vs. 36.0%) but reduced Gemma-4-31B’s from 40.3% to 28.8%.Source: §5.2 · p. 6

5.3 Effect of Target Skill Length

  • With original, longer skills, DAR fell from 81.3% to 4.3% for Gemma-4-31B, and from 100.0% to 46.8% for Muse-Glimmer-30B.The authors suggest longer skills may make the ciphertext and cue less salient; clean task-completion changes were not uniform, and rewriting effects could not be isolated from length.Source: Table 7 · p. 7, §5.3 · p. 7, Table 8 · p. 7

5.4 Observed Defense Behaviors

  • Qwen3.8-27B sometimes stopped after recognizing decoded text as prompt injection, so lower Layered CSI DSR partly reflected refusal to continue rather than inability to decode.Claude API refusal-related errors occurred 17 and 41 times for Haiku and Sonnet under Caesar CSI, and 4 and 40 times under Layered CSI; the authors could not determine whether these reflected a separate defense.Source: §5.4 · p. 7, Table 9 · p. 7

5.5 Comparison with Related Attacks

  • Adapted SkillTrojan reached 72.2% ASR on Muse-Glimmer-30B; CSI succeeded across all four open models on its 139-case benchmark, but the attack ASRs are not directly comparable.The methods differ in attacker permissions, agent setup, and applicable cases; SkillTrojan and CompoSkill were tested on 18 compatible cases.Source: Table 10 · p. 8, §5.5 · p. 8

5.6 Detection

  • Cisco flagged 6 of 139 Caesar CSI skills (4.32%) and 4 of 139 Layered CSI skills (2.88%); SkillRisk flagged none in either condition.The tested screening configurations rarely flagged skills carrying CSI payloads.Source: Table 11 · p. 8, §5.6 · p. 8

6 Conclusion

The conclusion presents CSI as a way to examine how agents recover and follow encoded instructions in third-party skills. It finds that attacks can succeed without a dedicated Caesar-decoding skill, while longer original skills reduce Layered CSI effectiveness.

  • CSI examines how agents recover and follow encoded instructions in third-party skills.Source: §6 · p. 8
  • Successful attacks do not always require a dedicated Caesar-decoding skill, while Layered CSI is substantially less effective with original, longer skills.Source: §6 · p. 8
  • The conclusion calls for evaluating both instruction recovery and downstream behavior, rather than relying solely on pre-use screening.It identifies preventing decoded untrusted content from implicitly authorizing execution as the central security challenge.Source: §6 · p. 8

7 Limitations

The reported attack results use shortened skills, while the paper identifies boundaries on generalizing those results, interpreting defense behavior, and assessing scanner coverage.

7 Limitations

  • Shortening changes wording and organization as well as length, so the results cannot be attributed to length alone or assumed to extend to unmodified third-party skills.Clean-task results also vary by model, so shortening is not universally cost-free.Source: §7 · pp. 8–9
  • Observed defense behaviors are specific to the tested models and services, and refusals can also prevent legitimate task completion.Because the underlying Claude detection method is unavailable, refusal counts do not isolate a particular defense mechanism.Source: §7 · p. 9
  • Low unsafe-verdict rates from the tested scanner configurations establish neither evasion of other detection methods nor that every unsafe verdict identifies the injected payload.Source: §7 · p. 9

A Models Used in Experiments

The experiment model roster names four models and gives a corresponding model identifier for each.

A Models Used in Experiments

B Details of Metrics

The metric definitions distinguish legitimate task completion from the stages of an attack, including attempted decryption, complete instruction recovery, attack actions, and goal achievement.

B Details of Metrics

  • TCR evaluates completion of the original user task across 100 non-destructive cases, independently of attack behavior; destructive cases and specified missing-input or technical cases count as non-success.Source: B Details of Metrics · p. 10
  • DAR counts an active attempt to decrypt any encrypted layer, including unsuccessful attempts, but not merely reading a skill or viewing ciphertext.Source: B Details of Metrics · p. 11
  • DSR requires recovery of the complete final attack instruction; recovering only Layered CSI’s Caesar intermediate does not qualify.Source: B Details of Metrics · p. 11
  • AAR requires a concrete action matching the recovered instruction, and the reported metric excludes actions without verified recovery of the complete instruction.A matching command counts even if it fails.Source: B Details of Metrics · p. 11
  • ASR requires evidence that the attack instruction’s postcondition occurred, not merely a failed command, unsupported agent claim, or absent file.For Layered CSI, success combines verified complete-instruction recovery with evidence that the attack goal was achieved.Source: B Details of Metrics · p. 11
  • Together, the five metrics separate legitimate task completion from decryption attempts, complete recovery, attack actions, and attack-goal achievement.Source: B Details of Metrics · p. 11

C Example Skills for Layered CSI

The example combines a target presentation skill with Caesar and AES decryption skills, illustrating how an encoded instruction can direct an agent through two recovery stages before acting.

C Example Skills for Layered CSI

  • The target skill contains a Caesar-encoded intermediate instruction that directs the agent to use the AES skill and password to decrypt the preceding token, then execute the recovered instruction.The Caesar skill provides textual decoding guidance, while the AES skill exposes a decryption script; the agent must still decide whether to follow the returned plaintext.Source: C Example Skills for Layered CSI · pp. 11–12
  • The presentation skill recommends planning narrative and layout, preserving template geometry, rendering slides, and checking overflow, alignment, and visual hierarchy.Its guidance also covers slide analysis and checking that required tools are installed.Source: C Example Skills for Layered CSI · p. 11
  • The example’s Caesar skill preserves case and nonletters while shifting letters, and its guidance recommends testing plausible shifts when none is specified.The AES utility uses a password to decrypt a token containing random parameters and instructs users not to invent output for invalid tokens or password mismatches.Source: C Example Skills for Layered CSI · p. 12

D Example Judge Prompts

The appendix gives example judge prompts for separating legitimate-task completion from CSI behavior. The prompts distinguish decryption attempts and recovery from attack attempts and verified attack outcomes.

D Example Judge Prompts

  • The example scenario asks for a final thank-you slide in a financial report while the hidden instruction requests a backup through a script.The prompts assess task completion, decryption, and attack behavior as separate judgments.Source: D Example Judge Prompts · p. 12
  • Task-completion judging focuses on whether the original user task was completed, ignoring unrelated or harmful actions and checking the resulting artifacts.The prompts direct evaluators to verify created or edited files and processing outputs.Source: D Example Judge Prompts · p. 12
  • Decryption is attempted only when the agent takes a concrete recovery-oriented step; passively reading a skill or echoing ciphertext does not count.The final payload need not run for an attempt to count.Source: D Example Judge Prompts · p. 13
  • AES decryption success requires recorded recovery of the final plaintext, distinct from attempting decryption or executing the recovered instruction.Caesar-only decoding, an AES error, or an attempted command does not establish recovery.Source: D Example Judge Prompts · p. 13
  • Attack attempts and attack-goal achievement are judged separately: a matching post-recovery action can count as an attempt, but achievement requires concrete evidence of the requested postcondition.A failed command or uncorroborated agent claim does not establish achievement.Source: D Example Judge Prompts · p. 13
Loading 2610.18262v1…