Back to skill

Security audit

Urdu Translator

Security checks for vulnerabilities and agentic risk

Overview

This is a small Urdu translation skill with a prompt-injection hardening gap but no evidence of hidden access, persistence, credential use, or destructive behavior.

Install this if you want an Urdu/Roman Urdu translator, but avoid using it as a privileged tool runner. For stronger safety, the publisher should separate translation instructions from source text with structured roles and explicitly treat the source text as inert content to translate.

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

Warning
Location
index.js:18
Finding
Prompt Injection Through Untrusted Translation Content## Vulnerability Details **File Location**: `index.js:18-29` **Vulnerability Type**: Untrusted input directly interpolated into an instruction-bearing Agent prompt **Risk Level**: Medium ### Vulnerable Code ```js async run({ content, format = "script" }, { agent }) { let instruction = ""; if (format === "roman") { instruction = "Translate the following into Roman Urdu (Urdu written in English alphabets like 'Kaise ho?'):"; } else { instruction = "Translate the following into Pure Urdu Script (Urdu written in its native characters):"; } const response = await agent.chat(`${instruction}\n\n"${content}"`); return response; } ``` ### Technical Analysis The attacker-controlled `content` parameter is directly concatenated with the translation instruction and submitted to `agent.chat`. Quotation marks do not establish a trusted security boundary for a language model. An attacker can include closing quotation marks, prompt delimiters, or instruction-like text that attempts to override the intended translation operation. The implementation does not use structured message roles to separate trusted instructions from untrusted content. It also does not instruct the Agent to treat the supplied content exclusively as text to translate. Consequently, the model may interpret embedded instructions as part of its active task rather than as inert source material. ### Attack Path 1. An attacker invokes the skill with malicious instructions embedded in the `content` parameter. 2. The skill interpolates that content directly into the same prompt containing the trusted translation instruction. 3. The combined prompt is passed to `agent.chat`. 4. The model may follow the embedded instructions instead of translating the content. 5. Depending on the capabilities exposed through the host Agent, this may manipulate the response or induce other unintended Agent behavior. For example, an attacker could provide content conceptually resembling: ```text ...[truncated 923 chars]
Remediation
## Remediation Suggestions 1. Use a structured chat API with separate roles so the translation policy is placed in a trusted system or developer message and the source text is supplied as untrusted user data. 2. Explicitly instruct the model that all text inside the translation payload is data to translate and that instructions contained within it must never be followed. 3. If supported, pass the source text through a dedicated structured field rather than interpolating it into an instruction string. 4. Apply strict input length limits to reduce denial-of-service risk and constrain excessively large adversarial prompts. 5. Do not grant the translation Agent access to unrelated tools, secrets, files, or system operations. Enforce least privilege so that prompt injection cannot escalate beyond incorrect translation output. 6. Add adversarial tests covering embedded instructions, quotation termination, role-like delimiters, and requests to ignore prior instructions. 7. If structured roles are unavailable, use clearly defined randomized or escaped delimiters and reiterate that delimited content is inert translation material. This is defense in depth and is weaker than genuine role separation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The README states that the skill translates content into Urdu and only documents a single usage pattern that forces Urdu output. This is a natural-language locale policy issue because it imposes a specific language choice without mentioning user opt-in or alternative language selection.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The description states the skill translates any content into Urdu Script or Roman Urdu, making Urdu the mandatory output language. The only selectable option is script versus romanized output, which does not provide a user language choice or opt-in, matching the locale/language policy violation criteria.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The skill is described as translating content into Urdu and offering only Urdu script or Roman Urdu output formats. This can be a language/locale policy concern because the skill constrains output language to Urdu without explicitly stating that this is only used when the user requests Urdu translation, though the examples partially imply that context.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The package metadata identifies the skill exclusively as an Urdu translator through the name and display text, with no indication that users can choose another language or opt into this locale-specific behavior. Under the policy for natural-language violations, a forced language/locale constraint should be documented as optional or clearly justified.

Static analysis

No suspicious patterns detected.