Back to skill

Security audit

Catmcp Data Analysis

Security checks for vulnerabilities and agentic risk

Overview

This database analysis skill appears legitimate, but it could expose sensitive CatLab records because it directs agents to query private messages, wallets, user settings, gift codes, and related data without requiring authorization checks.

Install only in a trusted internal environment where the database gateway enforces least-privilege access, authenticated user identity, tenant and ownership filters, collection allowlists, auditing, and redaction for private messages, wallet values, gift codes, and user settings. Do not run it with broad database credentials unless those controls are enforced outside the skill.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:9
Finding

Missing Authorization Controls for Sensitive Database Queries

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:9-15, 20-26, 50-58
Vulnerability Type: Missing authorization and least-privilege enforcement
Risk Level: High

Complete Relevant Snippet

markdown
2.  **Locate Collection**: Based on business knowledge, which collection does the request involve? (For example, references to “replies/messages” must use `Whisper_Mail`.)
3.  **Verify Structure**: Do I know the collection's current field names and data types?
    - **Mandatory requirement**: Unless it is an extremely simple single-table `query_*` operation with exactly matching parameters, the **first tool must be** `inspect_collection_sample`.
    - **Do not guess from experience**: Even when documentation describes the structure, use `inspect` to verify the live environment.
markdown
3.  **Security Boundary**:
    - Default `limit` is 20, with a maximum of 100.
    - Unless the user explicitly requests “details,” do not output complete documents (avoid `$push: "$$ROOT"`).
markdown
- **Murmur system**: `Whisper` (primary table), `Whisper_Mail` (replies/messages/private messages), `Whisper_Raw` (raw data/public status).
- **Achievements/activities**: `Achievement` and `history`, `Gift` (activity details in the `content` field), `Gift_Codes` (gift codes, joined through `activity_name`).
- **Content collections**: `Contribute_Article`, `Goods_Collection`, `Goods_Collection_Cards`.
- **System configuration**: `Option_Global` (platform), `Option_User` (user settings).
- **User wallets**: `CatLab_Wallet` (user wallet), `CatLab_Wallet_History` (user redemption records).

The excerpts above are faithful English renderings of the corresponding Chinese instructions in the audited file.

Technical Analysis

The Skill instructs the agent to inspect live MongoDB collection schemas and query collections containing private messages, user settings, wallet balances, redemption histories, and gift codes. However, it does not require authent ...[truncated 2430 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require authenticated identity before database access

    • Bind every tool invocation to a verified user and tenant identity.
    • Reject sensitive queries from anonymous or unverifiable callers.
  2. Enforce authorization server-side

    • Apply role-based or attribute-based authorization in the database gateway rather than relying solely on agent instructions.
    • Define explicit collection and operation allowlists for each role.
    • Deny access by default.
  3. Apply mandatory ownership and tenant filters

    • Automatically constrain private-message, settings, wallet, and history queries to the authenticated user's records.
    • Ensure callers cannot remove or override these predicates through natural-language requests or aggregation pipelines.
  4. Restrict highly sensitive collections

    • Prohibit general-purpose access to unclaimed gift codes.
    • Expose gift-code operations through a dedicated redemption service that returns only success or failure, not raw codes.
    • Restrict wallet and private-message access to narrowly scoped business functions.
  5. Introduce field-level controls

    • Redact message bodies, redeemable codes, internal identifiers, and financial fields unless explicitly required and authorized.
    • Return aggregated or masked results wherever possible.
  6. Constrain schema-inspection and aggregation tools

    • Prevent schema sampling from exposing sensitive values.
    • Validate aggregation pipelines against an allowlist of permitted stages, collections, fields, and mandatory filters.
    • Disallow unrestricted joins that can bypass access boundaries.
  7. Add auditing and abuse detection

    • Log the authenticated principal, purpose, collections, filters, fields, result count, and authorization decision for each operation.
    • Alert on bulk access, cross-user lookups, gift-code enumeration, and repeated denied requests.
  8. Test authorization boundaries

    • Add negative tests ...[truncated 221 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest description is written entirely in Chinese and presents the skill as a Chinese-language assistant, which may imply a fixed language/locale experience. Because there is no indication that users can choose another language or opt in to this locale, this can be considered a natural-language policy concern under the language/locale rule.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.