Back to skill

Security audit

moegirlpedia-mediawiki-api

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Moegirlpedia lookup purpose, but it asks the agent to use persistent memory for credential-rotation tracking and includes dormant account-changing API methods.

Review this before installing if your agent has persistent memory enabled or if the Moegirlpedia bot password has more than read/watchlist permissions. Use a dedicated BotPassword with only the documented permissions, avoid broad edit or rollback rights, and disable or ignore the memory-based rotation tracking unless you explicitly want this skill to store that date across sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:104
Finding

Unnecessary Persistent Agent Memory Access and Modification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 104–108
Vulnerability Type: Persistent Agent memory access and modification
Risk Level: Medium

Vulnerable Instructions

markdown
Before using this Skill, check memory for the date on which the bot password was last rotated:

- If the last rotation date is unknown, ask the user for that date after completing the current task and record it.
- If more than 90 days have passed, remind the user to rotate the bot password and update `MOEGIRLPEDIA_BOT_PASSWORD`.
- After a successful rotation, update the rotation date stored in memory to the current date.

Technical Analysis

These instructions direct the Agent to inspect and modify persistent memory. Persistent state access is not required for the Skill's declared purpose of making authenticated, read-oriented MediaWiki API requests.

The instructions also extend the Skill's behavior beyond the requested API operation by requiring the Agent to ask the user for credential-maintenance information and record that information for future sessions. This establishes an unnecessary persistence boundary in which content supplied by the Skill can influence long-term Agent state.

The stored rotation date is not itself a credential and is relatively low sensitivity. However, permitting a Skill to initiate persistent memory reads and writes creates a broader trust concern: state introduced during one invocation can affect later sessions. The reviewed instructions only request storage of a rotation date; no arbitrary rule injection or operating-system persistence was identified.

Attack Path

  1. The Agent loads the Skill instructions while handling a MediaWiki API request.
  2. The Agent follows the password-rotation section and queries persistent memory for a previous rotation date.
  3. If no date exists, the Agent asks the user for the information even though it is not necessary for the requested API operation.
  4. The Agent writes the suppli ...[truncated 879 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all instructions requiring the Agent to inspect or modify persistent memory.
  2. Keep password-rotation guidance optional and non-persistent. Display it only when explicitly requested by the user or when the user directly supplies a rotation date for the current interaction.
  3. If rotation tracking is required, use a dedicated, narrowly scoped configuration field rather than general Agent memory.
  4. Require explicit user consent before storing rotation metadata.
  5. Define a strict schema that accepts only a validated calendar date and cannot contain free-form instructions.
  6. Ensure the stored metadata is isolated to this Skill and cannot influence unrelated sessions or Agent safety policies.
  7. Document retention, deletion, and update behavior for any rotation metadata.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Based on the supplied snippet, the code's observable behavior is limited to command-line execution and error handling. It does not show any authenticated access to Moegirlpedia, MediaWiki API calls, page search/parsing/content retrieval, or watchlist/recent-change features described in the declaration. Because the visible code reflects a generic CLI entrypoint rather than the declared API-integration purpose, the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · dist/index.js (reported line 399)May include surrounding context.

js
var rules = /* @__PURE__ */ (function() {
      const _2 = [1, {}], _3 = [2, {}], _4 = [1, { "com": _2, "edu": _2, "gov": _2, "net": _2, "org": _2 }], _5 = [1, { "com": _2, "edu": _2, "gov": _2, "mil": _2, "net": _2, "org": _2 }], _6 = [0, { "*": _3 }], _7 = [2, { "s": _6 }], _8 = [0, { "relay": _3 }], _9 = [2, { "id": _3 }], _10 = [1, { "gov": _2 }], _11 = [0, { "airflow": _6, "lambda-url": _3, "transfer-webapp": _3 }], _12 = [0, { "airflow": _6, "transfer-webapp": _3 }], _13 = [0, { "transfer-webapp": _3 }], _14 = [0, { "transfer-webapp": _3, "transfer-webapp-fips": _3 }], _15 = [0, { "notebook": _3, "studio": _3 }], _16 = [0, { "labeling": _3, "notebook": _3, "studio": _3 }], _17 = [0, { "notebook": _3 }], _18 = [0, { "labeling": _3, "notebook": _3, "notebook-fips": _3, "studio": _3 }], _19 = [0, { "notebook": _3, "notebook-fips": _3, "studio": _3, "studio-fips": _3 }], _20 = [0, { "shop": _3 }], _21 = [0, { "*": _2 }], _22 = [1, { "co": _3 }], _23 = [0, { "objects": _3 }], _24 = [2, { "eu-west-1": _3, "us-east-1": _3 }], _25 = [2, { "nodes": _3 }], _26 = [0, { "my": _3 }], _27 = [0, { "s3": _3, "s3-accesspoint": _3, "s3-website": _3 }], _28 = [0, { "s3": _3, "s3-accesspoint": _3 }], _29 = [0, { "direct": _3 }], _30 = [0, { "webview-assets": _3 }], _31 = [0, { "vfs": _3, "webview-assets": _3 }], _32 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, "dualstack": _27, "s3": _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, "cloud9": _31 }], _33 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, "dualstack": _28, "s3": _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, "cloud9": _31 }], _34 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, "dualstack": _27, "s3": _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "analytics-gateway": _3, "aws-clo
...[truncated 28 chars]

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill advertises a read-oriented purpose, but the bundled API client includes write-capable methods such as login-backed edit, rollback, option changes, and watch/unwatch actions. In an agent setting, undocumented mutating capabilities materially expand what the skill can do if invoked incorrectly, prompt-injected, or later exposed through additional wrappers, violating least privilege and increasing the risk of unauthorized account actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Rollback is a privileged destructive action that is not justified by the stated purpose of retrieving and summarizing encyclopedia data. In a credentialed agent environment, retaining rollback support creates a direct path for account misuse, content reversion, and moderation actions outside user expectations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requires internet access and authenticated API use but does not declare an explicit tool scope such as allowed network destinations or permissions. This weakens policy enforcement and increases the chance the skill could make unintended outbound requests or expand behavior beyond the user-visible contract if the underlying scripts are modified or compromised.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, including the description, usage, warnings, and operational guidance. Under the policy rule for natural-language violations, forcing a specific language without offering user choice or documenting a justified locale restriction is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code reads bot credentials from environment variables and submits them to the remote MediaWiki API, then all operations reuse the authenticated session for further network requests. In this file there is no confirmation prompt, print/log disclosure, or inline warning to tell a user that invoking the CLI will authenticate to a remote service and transmit credentials/session cookies.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The client can modify user options despite the skill being presented as a data-access utility. This broadens the effective permission surface of the authenticated account and could allow silent preference changes, behavioral tampering, or persistence-related changes if later exposed or misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Watch and unwatch modify the authenticated user's watchlist, but the manifest only describes generating watchlist briefs. That mismatch can lead users or orchestrators to grant this skill more trust than warranted, while an attacker or prompt injection could leverage the hidden capability to alter monitoring state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

These returned summary strings are hard-coded in Chinese, forcing a specific output language for users of the CLI/API response path. The file does not provide any user opt-in, locale selection, or justification that the skill is intentionally restricted to Chinese-language output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

These watchlist summary lines are hard-coded in Chinese and will be returned regardless of the user's preferred language. That creates a language-policy issue because the code enforces a specific locale without opt-in or any documented rationale in this file.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · dist/index.js.LEGAL.txt (reported line 23)May include surrounding context.

text
* specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · dist/index.js.LEGAL.txt (reported line 27)May include surrounding context.

text
* specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 30)May include surrounding context.

json
"test:watch": "vitest"
  },
  "engines": {
    "node": "^24.11"
  },
  "dependencies": {
    "tough-cookie": "^6.0.1"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
89% confidence
Finding

The production dependency tough-cookie is specified with a floating caret range, so installs may resolve to different versions over time. Because this package handles authenticated MediaWiki access and likely stores session cookies, an imprecise version can make exposure to dependency vulnerabilities harder to assess and can unintentionally pull in a vulnerable release in some environments.

Content

Scanner excerpt · package.json (reported line 33)May include surrounding context.

json
"node": "^24.11"
  },
  "dependencies": {
    "tough-cookie": "^6.0.1"
  },
  "devDependencies": {
    "@annangela/eslint-config": "^11.0.0",

Unverifiable Dependency: tough-cookie has 3 known advisory(ies) (CVE-2023-26136 (tough-cookie Prototype Pollution vulnerability); CVE-2017-15010 (Regular Expression Denial of Service in tough-cookie); CVE-2016-1000232 (ReDoS via long string of semicolons in tough-cookie)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The manifest uses tough-cookie with a floating range, and that package has multiple historical advisories. In a skill that performs authenticated API access and likely processes cookies/session state, uncertainty about the resolved version is more concerning because a vulnerable cookie library could affect session integrity, availability, or request handling behavior.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 36)May include surrounding context.

json
"tough-cookie": "^6.0.1"
  },
  "devDependencies": {
    "@annangela/eslint-config": "^11.0.0",
    "@types/node": "^24.10.1",
    "clawhub": "0.9.0",
    "esbuild": "^0.28.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 37)May include surrounding context.

json
},
  "devDependencies": {
    "@annangela/eslint-config": "^11.0.0",
    "@types/node": "^24.10.1",
    "clawhub": "0.9.0",
    "esbuild": "^0.28.0",
    "types-mediawiki-api": "^2.0.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 39)May include surrounding context.

json
"@annangela/eslint-config": "^11.0.0",
    "@types/node": "^24.10.1",
    "clawhub": "0.9.0",
    "esbuild": "^0.28.0",
    "types-mediawiki-api": "^2.0.0",
    "typescript": "^6.0.2",
    "vitest": "^4.1.4"

Unverifiable Dependency: esbuild has 2 known advisory(ies) (GHSA-67mh-4wv8-2f99 (esbuild enables any website to send any requests to the development server and r); GHSA-g7r4-m6w7-qqqr (esbuild allows arbitrary file read when running the development server on Window)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 40)May include surrounding context.

json
"@types/node": "^24.10.1",
    "clawhub": "0.9.0",
    "esbuild": "^0.28.0",
    "types-mediawiki-api": "^2.0.0",
    "typescript": "^6.0.2",
    "vitest": "^4.1.4"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 41)May include surrounding context.

json
"clawhub": "0.9.0",
    "esbuild": "^0.28.0",
    "types-mediawiki-api": "^2.0.0",
    "typescript": "^6.0.2",
    "vitest": "^4.1.4"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 42)May include surrounding context.

json
"esbuild": "^0.28.0",
    "types-mediawiki-api": "^2.0.0",
    "typescript": "^6.0.2",
    "vitest": "^4.1.4"
  }
}

Unverifiable Dependency: vitest has 3 known advisory(ies) (CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed); CVE-2026-84373 (Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock); CVE-2025-24964 (Vitest allows Remote Code Execution when accessing a malicious website while Vit)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.