Back to skill

Security audit

maimai-cli

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Maimai CLI helper with disclosed Cookie handling and no embedded executable code, though users should be careful with the external CLI install and saved image downloads.

Install only a trusted or pinned `maimai-cli` release, import Cookies from your own terminal instead of pasting them into chat, use `maimai logout` if a Cookie may be exposed, and choose image download directories deliberately.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
references/auth.md:5
Finding

Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: references/auth.md, lines 5–9
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Complete Code Snippet:

markdown
If not installed:

```bash
uv tool install maimai-cli
text

### Technical Analysis

The installation command retrieves `maimai-cli` without specifying an exact version, package hash, lockfile, or trusted package index. Consequently, the installed executable may differ from the artifact reviewed during this audit.

The external CLI performs security-sensitive operations, including importing and storing an authenticated Maimai Cookie, accessing account data, downloading content, and issuing authenticated API requests. Because the CLI implementation is not included in this project, its behavior could not be verified. If the package registry, package release, maintainer account, or transitive dependency were compromised, a malicious release could execute with the privileges of the user running the installation.

This finding identifies a supply-chain exposure, not confirmed malicious behavior. The reviewed documentation contains explicit Cookie-safety guidance, and no embedded malicious scripts, obfuscated payloads, persistence mechanisms, or credential-exfiltration instructions were found.

### Attack Path

1. An attacker compromises the package publisher, package registry entry, or a dependency used by `maimai-cli`, or publishes an unexpected package version through an unsafe resolution source.
2. A user follows the documented command:
   ```bash
   uv tool install maimai-cli
   ```
3. The package manager resolves and installs the currently available package rather than a reviewed, immutable release.
4. The user invokes the installed `maimai` executable and imports an authenticated Cookie.
5. Malicious package code executes under the user's account and may read the supplied credential, access files available to that account, mak
...[truncated 672 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the package to an exact reviewed version, for example:
    bash
    uv tool install 'maimai-cli==1.1.0'
    
  2. Use cryptographic hashes or an equivalent integrity-verified lock mechanism so that the resolved package artifact is immutable.
  3. Explicitly configure and document the trusted package index. Disable unintended fallback indexes where supported to reduce dependency-confusion risk.
  4. Pin and audit transitive dependencies in the CLI's distributable package.
  5. Link the documented Skill version to a specific source commit and reproducible release artifact.
  6. Include or vendor the executable source in the audited project when feasible, allowing the credential handling, file permissions, network destinations, and download behavior to be reviewed.
  7. Publish signed release artifacts and verify signatures or attestations before installation.
  8. Run the CLI with least privilege and ensure stored Cookie files are restricted to the current user.
  9. Add an upgrade process requiring security review before changing the pinned version.
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 (3)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This markdown file includes maimai images ... --download ./maimai-images, which performs a file write operation by saving images locally. The section explains how to use the command but does not warn that files will be written to the specified directory or advise the user to confirm the destination before downloading.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all usage instructions, examples, and guidance exclusively in Chinese. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a policy issue unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This is a markdown file, so SQP-2 applies to omitted warnings about behaviors affecting user data or system integrity. The workflow explicitly uses maimai images 1 --download ./maimai-hot-images, which writes files locally, but the surrounding documentation provides no warning or disclosure about saving files to disk or potential overwrites/storage implications.

Content

No source excerpt is available for this finding.