Back to skill

Security audit

Hermes 记忆与技能系统

Security checks for vulnerabilities and agentic risk

Overview

The skill’s memory features fit its stated purpose, but its install and upgrade guidance includes unverified downloaded code execution and broad data-deletion steps that need review.

Review this before installing in any real workspace. Treat it as a persistent memory and skill-generation system that may store conversations, tool activity, and file-operation traces. Do not follow the documented wget-and-run upgrade paths unless the publisher, checksum, and signature are independently verified. Avoid running the recursive deletion or backup-pruning commands on valuable data without a verified backup and path checks. Keep exports and webhooks disabled unless you know exactly what data will leave the machine.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • 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 (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/DEPLOYMENT_GUIDE.md:633
Finding

Unverified Release Archive Is Downloaded and Executed During Upgrade

Content
View full analysis

Vulnerability Details

File Location: references/DEPLOYMENT_GUIDE.md:633-646
Vulnerability Type: Unauthenticated remote payload retrieval and execution
Risk Level: High

Vulnerable Code

bash
# 2. Download the new version
wget https://github.com/your-org/hermes-system/releases/download/v1.0.1/hermes-system-1.0.1.tar.gz

# 3. Stop the service
./bin/hermes-stop

# 4. Extract the new version
tar -xzf hermes-system-1.0.1.tar.gz
cd hermes-system-1.0.1

# 5. Run the upgrade script
./bin/hermes-upgrade --from 1.0.0 --to 1.0.1

# 6. Start the service
./bin/hermes-start

Technical Analysis

The documented upgrade procedure downloads a release archive from a placeholder GitHub organization, extracts it, and executes scripts from the archive without verifying a cryptographic signature or a pinned checksum.

HTTPS protects the connection in transit but does not establish that the release itself is the expected audited artifact. The effective payload can change after this Skill package has been reviewed. The use of the placeholder namespace your-org further prevents users from establishing that the download originates from the declared project publisher.

Although an earlier installation example mentions GPG verification, this upgrade path does not perform that verification. It also does not specify a trusted signing-key fingerprint or a pinned archive digest.

Attack Path

  1. An attacker gains control of the referenced repository, release process, organization namespace, or release credentials.
  2. The attacker replaces the hermes-system-1.0.1.tar.gz release with an archive containing malicious hermes-upgrade or hermes-start scripts.
  3. An administrator follows the documented upgrade procedure.
  4. wget retrieves the attacker-controlled archive.
  5. tar extracts the payload without validating its identity or checking archive paths.
  6. The administrator executes `./bin/hermes- ...[truncated 922 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the placeholder your-org URL with the verified, publisher-controlled repository.
  2. Publish a SHA-256 or stronger digest through a separately authenticated release channel.
  3. Verify the digest before extraction and fail closed on any mismatch:
    bash
    wget --https-only --secure-protocol=TLSv1_2 \
      https://github.com/VERIFIED-ORG/hermes-system/releases/download/v1.0.1/hermes-system-1.0.1.tar.gz
    echo "PINNED_SHA256  hermes-system-1.0.1.tar.gz" | sha256sum --check -
    
  4. Sign every release and document the expected signing-key fingerprint. Importing an arbitrary key from the same release location is insufficient.
  5. Require both signature and checksum verification before executing any downloaded script.
  6. Inspect archive entries before extraction and reject absolute paths, parent-directory traversal, symlinks to sensitive locations, and unexpected executable files.
  7. Perform upgrades under a dedicated, least-privileged service account with write access limited to the required installation and data directories.
  8. Pin immutable release identifiers and protect the publisher’s release workflow with branch protection, reviewed builds, artifact attestations, and short-lived publishing credentials.

T03 · Remote Payload Retrieval and Execution

Error
Location
references/VERSION_MANAGEMENT.md:246
Finding

Manual Version Upgrade Executes an Unauthenticated Downloaded Release

Content
View full analysis

Vulnerability Details

File Location: references/VERSION_MANAGEMENT.md:246-254
Vulnerability Type: Unauthenticated remote payload retrieval and execution
Risk Level: High

Vulnerable Code

bash
# 3. Download the new version
wget https://github.com/your-org/hermes-system/releases/download/v1.0.0/hermes-system-1.0.0.tar.gz

# 4. Extract
tar -xzf hermes-system-1.0.0.tar.gz
cd hermes-system-1.0.0

# 5. Run the migration script
./bin/hermes-migrate --from 0.9.0 --to 1.0.0

Technical Analysis

The manual upgrade instructions retrieve an archive from a mutable external release URL and immediately execute a migration program from it. No checksum, signature, trusted signing-key fingerprint, provenance attestation, or package identity check is performed.

Migration programs are especially security-sensitive because they commonly receive access to existing configuration, persistent memories, databases, backups, and installation directories. A malicious replacement can exploit that expected access without needing a separate privilege-escalation vulnerability.

Attack Path

  1. An attacker compromises or takes control of the referenced release source or its publishing credentials.
  2. The attacker publishes a modified archive containing a malicious bin/hermes-migrate.
  3. A user follows the manual upgrade guide and downloads the archive.
  4. The user extracts the archive and changes into the attacker-controlled directory.
  5. The user invokes ./bin/hermes-migrate.
  6. The migration payload executes with the user’s permissions and can read or modify existing Hermes and OpenClaw data.
  7. The payload can establish further persistence by altering installed scripts, generated skills, workspace configuration, or files subsequently loaded by OpenClaw.

Impact Assessment

Exploitation results in arbitrary code execution as the upgrading user. The likely scope includes existing Hermes data, OpenC ...[truncated 397 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not execute downloaded migration tools until the release has been cryptographically authenticated.
  2. Replace the placeholder repository with the verified official organization and document the canonical release URL.
  3. Pin a release checksum in version-controlled documentation or a signed manifest:
    bash
    wget --https-only \
      https://github.com/VERIFIED-ORG/hermes-system/releases/download/v1.0.0/hermes-system-1.0.0.tar.gz
    echo "PINNED_SHA256  hermes-system-1.0.0.tar.gz" | sha256sum --check -
    
  4. Verify a detached release signature against a pre-established signing-key fingerprint.
  5. Use reproducible builds and signed provenance attestations where supported.
  6. Run migration in a restricted account or sandbox with explicit access only to the files required for migration.
  7. Create and validate an offline backup before migration, and prevent the migration process from modifying backup copies.
  8. Reject archives containing unsafe paths or unexpected executable files before extraction.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation presents the skill as an agent enhancement layer, yet the broader behavior includes acceptance-test orchestration, status checking, artifact generation, and executable test script creation. Hidden or under-disclosed execution and artifact-generation behaviors expand attack surface and can lead to unexpected command execution or persistent file creation in trusted environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation presents the skill as an agent enhancement layer, yet the broader behavior includes acceptance-test orchestration, status checking, artifact generation, and executable test script creation. Hidden or under-disclosed execution and artifact-generation behaviors expand attack surface and can lead to unexpected command execution or persistent file creation in trusted environments.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The troubleshooting section recommends a recursive forced deletion of the cache directory without additional guardrails. Even though the target appears scoped, destructive shell patterns in documentation are risky because variable path confusion, symlink issues, or operator copy/paste mistakes can turn maintenance steps into accidental data loss.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 587)May include surrounding context.

md
./bin/hermes-metrics --detailed

# 清理缓存
rm -rf var/cache/*

# 重启服务
./bin/hermes-restart

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The guide instructs users to run 'rm -rf var/data/*' during a reset, which irreversibly deletes application data. In a system explicitly handling persistent memory and generated artifacts, this is operationally dangerous and could wipe critical state, especially if executed from the wrong working directory or by automation.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 604)May include surrounding context.

md
cp -r var/data var/data.backup.$(date +%Y%m%d)

# 清理数据(谨慎操作)
rm -rf var/data/*
rm -rf var/cache/*

# 重新初始化

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The cache deletion command is less severe than data deletion but still uses an unsafe recursive pattern in a guide that may be followed verbatim. In the broader Hermes context, operators may run this during incident response or recovery, when mistakes are more likely and safeguards matter more.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 605)May include surrounding context.

md
# 清理数据(谨慎操作)
rm -rf var/data/*
rm -rf var/cache/*

# 重新初始化
./bin/hermes-init --force

Chaining Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The pipeline ls ... | tail ... | xargs rm -rf is unsafe because it chains filename discovery directly into recursive deletion without robust delimiting or validation. Filenames containing whitespace, newlines, or leading dashes can be misparsed by xargs/rm, and because WORKSPACE is user-influenced, a pathing mistake can turn retention cleanup into broader unintended deletion.

Content

Scanner excerpt · scripts/deploy.sh (reported line 125)May include surrounding context.

sh
log_success "现有部署已备份到: $backup_path"
            
            # 清理旧备份(保留最近5个)
            ls -1td "$backup_dir/hermes_"* 2>/dev/null | tail -n +6 | xargs rm -rf 2>/dev/null || true
        else
            log_warning "备份失败,继续部署..."
        fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill documentation includes shell-based installation and initialization steps and appears to rely on file-writing and deployment behavior, but it declares no explicit tool scope or permissions boundary. In an agent ecosystem, undocumented shell and filesystem capabilities increase the risk of over-privileged execution and make it harder for users or platforms to evaluate what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill prominently advertises cross-session memory and automatic synchronization, but it does not clearly warn users that conversation content may be persisted across sessions. This is dangerous because users may unknowingly disclose sensitive prompts, credentials, or personal data into a persistent store, creating privacy, retention, and secondary-access risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installation and usage instructions recommend production deployment and enable data export features without prominent warnings about the privacy and operational implications. This can lead users to deploy in sensitive environments without understanding that conversation-derived data may be exported or retained, increasing risk of unintended disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · config/hermes.yaml (reported line 152)May include surrounding context.

yaml
webhooks:
    enabled: false
    endpoints:
      - url: "https://api.example.com/webhook/hermes"
        events: ["skill_generated", "memory_updated", "error_occurred"]
        secret: ""

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 294)May include surrounding context.

md
webhooks:
    enabled: false
    endpoints:
      - url: "https://api.example.com/webhook/hermes"
        events: ["skill_generated", "memory_updated", "error_occurred"]
        secret: ""

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all operational instructions, test procedures, and acceptance criteria exclusively in Chinese. Under the policy rule for natural-language violations, forcing a specific language without user opt-in or documented justification can exclude users who do not share that locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The changelog documents cross-session persistent memory storage and task trajectory recording, but it does not present any clear privacy warning, consent requirement, retention limits, or handling guidance for potentially sensitive user data. In an agent skill that records conversations and execution traces, this omission can lead to unintentional collection and long-term storage of secrets, personal data, or proprietary information without adequate user awareness.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 389)May include surrounding context.

md
# 步骤4: 设置权限
echo "🔒 步骤4: 设置权限"
chmod +x "$DEPLOY_DIR/bin/"*
chmod 755 "$DEPLOY_DIR"
chmod 644 "$DEPLOY_DIR/config/"*.yaml

# 步骤5: 应用环境配置

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 390)May include surrounding context.

md
echo "🔒 步骤4: 设置权限"
chmod +x "$DEPLOY_DIR/bin/"*
chmod 755 "$DEPLOY_DIR"
chmod 644 "$DEPLOY_DIR/config/"*.yaml

# 步骤5: 应用环境配置
echo "⚙️ 步骤5: 应用环境配置"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 520)May include surrounding context.

delaycompress missingok notifempty create 644 root root }

text

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/DEPLOYMENT_GUIDE.md (reported line 562)May include surrounding context.

./bin/hermes-test --memory

检查权限

ls -la ~/.openclaw/workspace/memory/

text

#### 问题3: Skill生成失败

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide includes destructive commands that erase runtime data and cache, and although it says '谨慎操作', it does not clearly explain the irreversible impact or precisely scope what data will be lost. In a deployment guide for an agent system with persistent memory, this can cause accidental deletion of conversation memory, generated skills, or operational state if an operator follows the steps without full understanding.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manual rollback instructions copy backup contents over the current deployment without a prominent warning that existing files will be replaced. This creates risk of accidental overwrite, version mismatch, or partial restore if operators run it in the wrong directory or against an unexpected backup tree.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide includes a recursive chmod command that changes permissions on an entire project tree without clearly warning about its scope or safer alternatives. In an agent skill context, users may copy-paste commands blindly, and broad permission changes can weaken local file protections or affect unintended files if the path is wrong.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file includes an automatic upgrade command that can change installed software state, but the surrounding documentation does not provide a clear warning about its impact, prerequisites, or need for review before execution. For markdown files, commands that may affect user data or system integrity should be accompanied by user-facing cautionary guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script deletes old backup directories automatically using a retention policy without any confirmation, dry-run, or safety checks beyond a glob pattern. In a deployment script that operates on a user-controlled workspace path, this can cause unintended permanent data loss if the workspace is misconfigured or if the backup path resolves unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This shell script’s user-facing text and inline documentation are entirely in Chinese, including the startup banner, step descriptions, and status messages. That imposes a specific language on users without any documented opt-in or locale selection, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language documentation is predominantly in Chinese, and the file does not indicate that the skill is region-specific or provide an alternative language option. Under the policy rule, forcing a specific language without user opt-in or justification is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This manifest’s human-facing comments, section labels, and configuration guidance are entirely in Chinese, including operational notes and environment-variable examples. Under the stated policy, forcing a specific language or locale without offering choice or documenting a justified region-specific constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.