Back to skill

Security audit

Duolingo Learning OS

Security checks for vulnerabilities and agentic risk

Overview

This is a local learning tracker with disclosed persistent files and optional routing, but users should review its broad routing examples and sanitize topic names before any shell-based setup.

Install only if you want a persistent local learning workspace under ~/duolingo/. If you enable AGENTS routing, keep trigger topics specific and apply the snippet yourself after review. When creating topic folders, use simple validated slugs such as lowercase letters, numbers, and hyphens, and avoid passing raw topic names into shell commands.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
blueprint.md:18
Finding
Unsanitized Topic Slug Used in a Shell Command## Vulnerability Details **File Location**: `blueprint.md`, lines 18-21 **Vulnerability Type**: Command injection and path traversal **Risk Level**: High ### Vulnerable Code ```markdown For each active topic slug: ```bash mkdir -p ~/duolingo/topics/<topic-slug> ``` ``` ### Technical Analysis The Skill instructs the agent to place a topic-derived slug directly into an unquoted shell command. Topic names originate from user input during setup, as shown in `setup.md` lines 8-13, but the project does not define slug validation, canonicalization, shell escaping, or containment checks. If the placeholder is replaced directly with attacker-controlled content, shell metacharacters can introduce additional commands. Path separators or `..` components can also cause directory creation outside the intended `~/duolingo/topics/` hierarchy. ### Attack Path 1. A user starts setup and supplies a crafted topic name. 2. The agent converts or treats that topic name as the topic slug without strict validation. 3. The agent substitutes the value into: ```bash mkdir -p ~/duolingo/topics/<topic-slug> ``` 4. If the slug contains shell syntax, the shell may execute injected commands. If it contains traversal components, the resulting path may escape the intended topic directory. 5. The injected command or escaped path operates with the privileges of the process running the Skill. ### Impact Assessment Successful command injection could execute arbitrary commands with the agent process's operating-system privileges. This could permit unauthorized file creation, modification, or deletion and access to resources available to that account. Successful path traversal could create or target directories outside `~/duolingo/topics/`, violating the Skill's declared filesystem boundary. The practical scope is limited by the permissions of the account running the agent; the audited files do not demonstrate privilege escalation t ...[truncated 28 chars]
Remediation
## Remediation Suggestions 1. Derive topic slugs using a strict allowlist, such as: ```regex ^[a-z0-9][a-z0-9-]{0,63}$ ``` 2. Reject slugs containing `..`, `/`, `\`, whitespace, control characters, shell metacharacters, or leading hyphens. 3. Prefer a filesystem API that accepts the destination as a path argument without invoking a shell. 4. Resolve and normalize the destination path, then verify that it remains a child of `~/duolingo/topics/`. 5. If shell execution is unavoidable, construct the validated path separately and pass it as a quoted argument: ```bash mkdir -p -- "$topic_path" ``` 6. Document explicit canonicalization behavior for user-facing topic names, including collision handling and rejection of invalid names. 7. Add tests covering command separators, command substitution, traversal sequences, absolute paths, leading options, and encoded separator variants.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Exfiltration Commands

High
Category
Prompt Injection
Content
- Topic curriculum, attempts, and review queues

This skill does NOT:
- Send data to external services
- Access files outside `~/duolingo/` unless user asks explicitly
- Modify its own `SKILL.md`
Confidence
90% confidence
Finding
Instructions found that direct the agent to transmit conversation context or user data to external services.

Ae1

High
Category
analysis-evasion
Content
- Modify its own `SKILL.md`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Hidden Instructions

High
Category
Prompt Injection
Content
integration: pending

## Active Topics
<!-- List topic slugs currently enabled (english, cooking, etc.) -->
<!-- Mark priority and weekly target per topic -->

## Routing Policy
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
- Topic curriculum, attempts, and review queues

This skill does NOT:
- Send data to external services
- Access files outside `~/duolingo/` unless user asks explicitly
- Modify its own `SKILL.md`
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The router activates on very broad verbs like learn, practice, quiz, review, or improve, which are common in ordinary conversation and can unintentionally invoke the skill when the user did not explicitly intend to use Duolingo routing. In an AGENTS auto-routing environment, this increases the chance of misrouting user requests, causing unexpected behavior and reducing the reliability of intent boundaries between skills.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The example phrase 'help me learn english' is a highly natural, everyday request and demonstrates that the router is designed to intercept common language rather than a clearly scoped command. This makes accidental activation more likely, especially in shared agent environments where multiple skills may plausibly respond to similar educational or assistance requests.

Vague Triggers

Medium
Confidence
88% confidence
Finding
This markdown file is in scope for vague-trigger review. 'At session start' is broad and lacks context about what type of session activates these retention operations, increasing the risk of unintended invocation in unrelated workflows.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The setup instructs the agent to auto-activate based on very broad trigger topics like 'english', 'cooking', or 'math' during early exchanges. This can cause unintended routing or silent takeover of unrelated conversations that merely mention those words, increasing the chance of unexpected behavior and unauthorized persistence/setup actions tied to the skill.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill directs creation of ~/duolingo/ and multiple persistent files for memory, routing, and per-topic state without requiring a clear user-facing disclosure or consent at the time of writing. Persistent filesystem changes can surprise users, store sensitive learning/profile data, and create lasting agent behavior changes, especially when combined with activation routing.

Missing User Warnings

Low
Confidence
90% confidence
Finding
The skill instructs the agent to persistently modify multiple lesson-tracking files after each loop, but it does not require any user-facing notice or consent before writing session history, queue state, and memory data. This creates a transparency and data-governance issue: users may not realize persistent state is being changed, and repeated silent writes can accumulate sensitive educational or behavioral metadata over time.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
Natural-language policy review applies to all file types. The examples repeatedly prescribe 'english' as the topic in rotation patterns, which can imply a default language preference without stating that users may choose their own language or locale.

Static analysis

No suspicious patterns detected.