Back to skill

Security audit

afrexai-knowledge-management-free

Security checks for vulnerabilities and agentic risk

Overview

This skill is a knowledge-management helper, but it asks for broad command, write, and network-callback capabilities without clear limits or user controls.

Review before installing. Use it only in a constrained workspace, avoid storing personal or highly sensitive information, do not allow arbitrary shell commands, and disable or tightly preapprove any callback or external API destination. Do not run the agent as administrator for this skill.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:19
Finding

Excessive System Command Execution Capability

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 19–22; supporting command-execution and privilege guidance at lines 235–236 and 289–291
Vulnerability Type: Excessive privileges and violation of least privilege
Risk Level: Medium

Relevant code snippet:

yaml
tools:
- read
- exec
- write

The supporting documentation declares that the skill can execute system commands in a sandbox and recommends running with administrator privileges when permission errors occur.

Technical Analysis

The skill requests unrestricted exec capability even though its stated core purpose is extracting, querying, and storing structured knowledge. Those operations can ordinarily be implemented using constrained read and write functions without exposing a general command-execution interface.

The document does not define an allowlist of commands, argument-validation rules, working-directory restrictions, environment-variable filtering, timeout enforcement, or explicit user-confirmation requirements. It also provides generic troubleshooting guidance to retry operations with administrator privileges. This can expand the impact of unsafe commands instead of resolving permissions through narrowly scoped access controls.

No executable script or direct malicious command was found in the project. The risk arises from the excessive capability requested by the skill and the unsafe privilege guidance.

Attack Path

  1. An attacker supplies a document, knowledge entry, or instruction containing content designed to influence downstream command execution.
  2. The agent loads the skill, which declares access to the general-purpose exec tool.
  3. The agent interprets the attacker-controlled content as requiring a system command.
  4. Because no command or argument allowlist is defined, the command may execute with all permissions available to the agent process.
  5. If the command fails because of insufficient permissions, ...[truncated 840 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the exec tool from the declared capabilities unless a specific knowledge-management operation demonstrably requires it.
  2. Implement ordinary knowledge capture and storage exclusively through constrained read and write APIs.
  3. If command execution is essential, replace unrestricted execution with an allowlist of fixed executables and arguments.
  4. Reject shell metacharacters, command substitution, redirection, untrusted environment-variable expansion, and attacker-controlled executable paths.
  5. Use a dedicated low-privilege account and a sandbox with a restricted filesystem, disabled network access, resource limits, and a fixed working directory.
  6. Require explicit user confirmation showing the exact command before any high-impact execution.
  7. Remove the generic recommendation to run as administrator. Document narrowly scoped permission corrections instead.
  8. Record commands, arguments, exit status, and authorization decisions in an audit log without exposing secrets.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:54
Finding

Unrestricted User-Controlled Callback and External API Destination

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 54; supporting external API declaration at line 235
Vulnerability Type: Unvalidated outbound request destination and potential server-side request forgery
Risk Level: Medium

Relevant specification snippet, rendered in English:

markdown
| callback_url | string | Optional | Callback notification URL after asynchronous processing |

The skill also advertises integration with external services through standardized API requests and response handling.

Technical Analysis

The skill accepts a caller-provided callback_url but does not specify destination validation, protocol restrictions, DNS-resolution checks, redirect controls, authentication rules, payload minimization, or user-consent requirements.

An implementation that follows this interface could send requests to attacker-selected destinations. Without controls, this design can permit server-side request forgery against loopback services, private-network systems, link-local endpoints, or cloud instance metadata services. If callback payloads contain knowledge results, source information, logs, or metadata, the same mechanism can also disclose locally processed information.

The documented capability boundary states that the knowledge base uses local files, making unrestricted outbound callbacks an unnecessary expansion of the trust boundary. No concrete implementation was present, so the audit did not verify an actual HTTP request routine; the flaw is in the exposed configuration and absent security requirements.

Attack Path

  1. An attacker submits a crafted callback_url as part of the skill input.
  2. The URL points to an attacker-controlled server or a sensitive internal endpoint, such as a loopback service, private-network host, or link-local metadata service.
  3. The agent completes knowledge processing and initiates the documented callback.
  4. The callback reaches a destination that ...[truncated 1029 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove callback_url if asynchronous external notification is not essential to the skill's core function.
  2. If callbacks are required, permit only preconfigured HTTPS origins rather than arbitrary caller-provided URLs.
  3. Resolve hostnames before connection and reject loopback, private, link-local, multicast, reserved, and unspecified address ranges for both IPv4 and IPv6.
  4. Revalidate the destination after every DNS resolution and block DNS rebinding.
  5. Disable redirects or validate every redirect destination using the same policy.
  6. Restrict outbound ports and enforce network-level egress controls.
  7. Send only a minimal event identifier and status. Do not include knowledge content, local paths, logs, credentials, tokens, or environment data.
  8. Require explicit user consent before transmitting any processed information externally.
  9. Authenticate callbacks with scoped, rotatable credentials or signed messages, and never place secrets in URL query strings.
  10. Apply request timeouts, response-size limits, rate limits, and security logging.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

Documenting and enabling command execution for a knowledge-management skill grants a much broader capability than its stated purpose requires. In practice, this creates a path for arbitrary shell actions, filesystem modification, or misuse of host resources if prompts or workflows cause the agent to invoke exec on untrusted input.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says to use the skill whenever the user needs functionality related to this skill, which does not define specific triggers or boundaries beyond the skill name itself. This broad wording can overlap with many general knowledge-management requests and lacks explicit invocation constraints or negative examples.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill presents itself as a local knowledge-management engine but also exposes callback-based network behavior and external service integration. That mismatch can mislead users and orchestrators about where data may flow, increasing the risk of unintended exfiltration of sensitive knowledge-base contents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown describes file writes, command execution, and external callbacks without a clear warning that these operations can change the system or transmit data. In this context, the combination is more dangerous because the skill targets knowledge capture, which often involves sensitive internal documents that could be written, transformed, or sent externally without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation contradicts itself by first stating that no extra API key is required and later saying some functions do require API keys. These inconsistencies undermine safe deployment because operators cannot accurately determine whether the skill is local-only or may authenticate to external services, which affects secret handling and trust boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill claims local-file knowledge-base boundaries but also describes API/network failure cases such as 401, 429, and 504, implying outbound service dependencies. This contradiction obscures the actual execution model and can cause users to provide sensitive data under the false assumption that it remains local.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description states '支持中文交互' and the surrounding documentation is written as if Chinese is the default interaction mode, without indicating that the user may choose another language. This creates a locale/language constraint that is not presented as optional or justified as region-specific.

Content

No source excerpt is available for this finding.