Back to skill

Security audit

WHOIS查询服务

Security checks for vulnerabilities and agentic risk

Overview

This WHOIS skill appears purpose-related, but it asks for an API key and saves it in a local plaintext .env file while relying on a third-party service and carrying inconsistent copied documentation.

Install only if you are comfortable giving this publisher a XiaoBenYang API key, having that key saved in a local .env file, and sending domain lookup requests through mcp.xiaobenyang.com. Prefer setting the key through a secure environment or secret manager, review/remove the .env entry when done, and avoid requesting raw WHOIS output unless you need it because it may contain personal registration data.

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 (21)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill describes and relies on capabilities including environment access, local file read/write, and outbound network calls, yet no permissions are declared. This weakens reviewability and user consent because sensitive actions like reading/writing API keys and contacting third-party infrastructure can occur without explicit disclosure.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill is presented as a WHOIS query service, but the documented behavior includes credential collection and persistence, local configuration manipulation, and reliance on a third-party remote API rather than a straightforward local WHOIS lookup flow. This mismatch can mislead users and reviewers about what data is collected, where it is sent, and what side effects occur.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
Residual 'gaokao/学校搜索' references in project structure and invocation examples indicate copied or inconsistent documentation. Such misleading instructions can cause the agent or reviewer to misunderstand the tool's true purpose and overlook risky behaviors or incorrect function usage.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The skill is presented as a WHOIS query service, but this file adds capability to persist, mutate, and globally cache an API key in both .env and process environment state. That expanded credential-handling surface is not justified by simple WHOIS lookups and creates unnecessary secret exposure and persistence risk if the skill is installed or invoked in a broader agent environment.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The function writes to a local .env file and modifies runtime environment state, which exceeds the stated purpose of a WHOIS lookup skill. In an agent setting, unnecessary local file modification can create persistence, secret leakage, and configuration tampering opportunities unrelated to the advertised functionality.

Intent-Code Divergence

High
Confidence
95% confidence
Finding
The class docstring describes an unrelated '高考' skill while the manifest claims this is a WHOIS service, indicating code reuse or repurposing from a different project. Such provenance mismatch is a strong trust and supply-chain warning because it suggests the code may contain hidden assumptions, wrong endpoints, or unrelated data flows not disclosed by the manifest.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly instructs the agent to ask the user for an API key and persist it locally, but provides no warning about storage, scope, retention, or security of that credential. This creates a direct secret-collection workflow that can expose credentials through local files, logs, backups, or later unintended reuse.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The instruction to directly display reorganized raw API data can expose personally identifiable or otherwise sensitive WHOIS registration details without filtering. Because WHOIS data may include emails, phone numbers, addresses, and registrant metadata, indiscriminate output increases privacy and compliance risk.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The code persists the API key into a plain-text .env file without any visible warning, consent flow, or protections around file permissions. This can surprise users and increase the chance of credential disclosure through backups, source control mistakes, local compromise, or later reuse by unrelated processes.

Ssd 3

Medium
Confidence
97% confidence
Finding
This instruction creates a natural-language flow for collecting a sensitive credential from the user and retaining it locally. In skill contexts, such flows are especially dangerous because users may assume the request is platform-sanctioned and may not realize the secret is being stored beyond the current session.

Ssd 3

Medium
Confidence
95% confidence
Finding
Directing the agent to present raw API output without minimization can disclose sensitive registration data far beyond the user's need. The WHOIS context makes this more dangerous because domain records often contain personal or administrative contact information that should be handled carefully.

Credential Access

High
Category
Privilege Escalation
Content
default_year: int = 2025

    def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
Confidence
84% confidence
Finding
The code explicitly re-reads .env and force-extracts XBY_APIKEY outside the normal settings mechanism, creating custom secret-handling logic that is harder to audit and easier to misuse. In context, this is more concerning because the skill metadata does not justify custom credential ingestion and the code already shows unrelated service identity mismatches.

Credential Access

High
Category
Privilege Escalation
Content
def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
            for line in content.splitlines():
Confidence
84% confidence
Finding
Opening and reading the .env file directly for API key extraction expands access to local secrets beyond what is necessary for a WHOIS lookup helper. This increases the chance of secret mishandling, especially in shared agent runtimes where local configuration files may contain unrelated credentials.

Credential Access

High
Category
Privilege Escalation
Content
def save_api_key_to_env(api_key: str) -> bool:
    """将API key保存到.env文件"""
    try:
        env_path = Path(".env")
        lines = []
        if env_path.exists():
            lines = env_path.read_text(encoding="utf-8").splitlines()
Confidence
88% confidence
Finding
This function is dedicated to saving an API key to .env, meaning the skill intentionally persists credentials locally in plaintext. In the context of a WHOIS service, that is unnecessary privilege expansion and creates ongoing exposure if the file is read, synced, or committed elsewhere.

Credential Access

High
Category
Privilege Escalation
Content
def set_api_key(api_key: str) -> bool:
    """设置API key并持久化到.env"""
    if not api_key or not api_key.strip():
        return False
    api_key = api_key.strip()
Confidence
88% confidence
Finding
The function advertises setting and persisting an API key to .env, confirming intentional secret storage behavior rather than incidental configuration loading. Because the skill's stated purpose is WHOIS lookups, this hidden credential-management feature makes the skill context more suspicious and increases the risk of user misunderstanding and secret leakage.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
The dependency is specified with a lower-bound version only, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can unexpectedly introduce vulnerable or incompatible releases into the skill's environment.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
Using an unpinned version for pydantic makes installations non-deterministic and increases supply-chain risk, because newer versions may change behavior or include newly introduced issues. While not immediately exploitable by itself, it reduces assurance that deployed environments match tested ones.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
An unpinned pydantic-settings dependency allows package resolution to drift across installs, creating avoidable supply-chain and stability risk. In an MCP service, configuration parsing is a core function, so unexpected dependency changes can affect runtime behavior and security assumptions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
Leaving python-dotenv unpinned allows environments to pull different releases over time, which can introduce regressions or known-vulnerable versions without code changes. Since dotenv libraries often influence secret and configuration handling, version drift is a meaningful operational security concern.

Known Vulnerable Dependency: requests==2.31.0 — 5 advisory(ies): CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi); CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func) +2 more

Medium
Category
Supply Chain
Confidence
98% confidence
Finding
The requirements allow installation of requests 2.31.0, which is flagged with multiple advisories, including credential leakage and request verification issues. Because this skill is a network-facing WHOIS query service that likely makes outbound requests based on user-supplied domains, vulnerable HTTP client behavior is more relevant and could expose credentials, weaken transport security, or enable unsafe request handling in supporting code paths.

Known Vulnerable Dependency: python-dotenv==1.0.1 — 1 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via )

Low
Category
Supply Chain
Confidence
84% confidence
Finding
python-dotenv 1.0.1 is flagged for a symlink-following arbitrary file overwrite issue in set_key. This skill is a WHOIS service and may not invoke dotenv write operations in normal runtime, so exploitability depends on whether the application ever modifies .env files, but the dependency remains a real risk if that code path exists in development, admin, or setup workflows.

Static analysis

No suspicious patterns detected.