Back to skill

Security audit

RFC文档服务

Security checks for vulnerabilities and agentic risk

Overview

This skill presents itself as an ietf.org RFC reader but routes requests and an API key through a third-party service while persistently storing the key locally.

Install only if you intentionally want to use the XiaoBenYang MCP proxy for RFC lookups, are comfortable sending RFC query parameters and an XBY API key to that service, and accept that the key will be stored in a local .env file. Do not treat this as a direct ietf.org-only RFC reader.

Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill documentation presents a simple RFC reader, but the package reportedly has environment, file read/write, and network capabilities without any declared permission model or user-facing disclosure. In this context, those capabilities matter because the skill also instructs the agent to collect and persist an API key, creating a path for undisclosed credential handling and outbound transmission.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The documented behavior claims direct RFC retrieval from ietf.org, but the finding indicates requests are actually sent to a third-party service, with credential storage and unrelated upstream configuration. This mismatch is dangerous because it can mislead users into disclosing secrets and trusting outputs under a false provenance, while data is actually routed to an undisclosed external endpoint.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The skill claims to read public RFCs from ietf.org, yet instructs the agent to demand an unrelated XBY API key and save it for later use. Requiring a secret for ostensibly public document access is a strong red flag for credential harvesting or undisclosed proxying through a third-party service.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The workflow includes an example for school-search functionality unrelated to RFC retrieval, indicating the skill may be repurposed from another project without adequate review. Such inconsistencies increase the risk of hidden or unintended behaviors, incorrect tool routing, and user confusion about what external actions the skill may perform.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The documented project structure references a different skill project, which suggests the package may contain reused components or stale documentation from another application. In a security context, that raises concern that unrelated code paths, endpoints, or credential logic may still be present and not disclosed to users.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The file implements a generic proxy client to an unrelated upstream service ('小笨羊MCP API') and does not contain logic specific to fetching or parsing RFC documents from ietf.org. In the context of a skill advertised as an RFC document service, this creates a serious trust-boundary violation: user inputs and tool invocations are forwarded to a third-party endpoint controlled by settings.base_url, enabling covert data exfiltration or unexpected remote actions under a misleading description.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The configuration clearly targets an unrelated '小笨羊高考' service, with mismatched env prefix, base URL, MCP ID, and comments that do not align with an RFC document reader. In a skill advertised as fetching RFCs from ietf.org, this mismatch is a strong indicator of repurposed or misdirected code that can route requests and credentials to an unrelated external service.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
This code persists an API key to a local .env file even though the declared skill purpose is read/fetch access to RFC documents, which ordinarily should not require storing unrelated secrets locally. Persisting credentials expands exposure through accidental commits, local disclosure, and reuse by other processes or future code.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill instructs the agent to collect an API key from the user and save it, but does not warn that the key is sensitive, where it will be stored, how long it will persist, or who can access it. This creates avoidable risk of credential exposure, especially because the skill already shows signs of undocumented third-party routing and file/env access.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The code sends arbitrary tool parameters and an API key to an upstream server in every request, but this file provides no transparency, minimization, or consent mechanism for what data leaves the local environment. Because the skill purports to be an RFC reader but actually relays data to another API, the mismatch in context makes undisclosed transmission more dangerous and increases the likelihood of sensitive prompt or document data being exposed.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The function silently writes the provided API key into .env and exports it into the process environment without any warning, confirmation, or indication of persistence. Users may provide a token expecting temporary use, while the code creates a durable secret footprint on disk that can later be exposed.

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
85% confidence
Finding
The code forcibly parses .env to extract XBY_APIKEY outside the normal settings mechanism, specifically targeting a secret for an unrelated service. In the context of an RFC reader, this manual credential collection is unnecessary and increases suspicion because it bypasses least-privilege expectations for the advertised functionality.

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
85% confidence
Finding
Opening and reading .env directly to search for XBY_APIKEY gives this skill access to local secrets beyond what an RFC document service should need. That broadens the blast radius if the skill is misused or later extended to transmit or log the loaded value.

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
A helper dedicated to saving an API key into .env creates durable storage for sensitive credentials on the local filesystem. In the context of a skill that should only retrieve public RFC documents, this is unnecessary secret handling and raises the risk of accidental disclosure or credential reuse.

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
87% confidence
Finding
This function exposes a simple path to persist any supplied API key to disk, normalizing secret storage as part of routine operation. For a public-document retrieval skill, that behavior is disproportionate to its stated purpose and increases local credential exposure without clear necessity.

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
93% confidence
Finding
The dependency is specified with a lower bound only (`requests>=2.31.0`), which allows future versions to be installed without review and makes builds non-reproducible. In a network-facing RFC retrieval service, dependency drift can unexpectedly introduce breaking changes or newly published malicious/compromised releases into production.

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
92% confidence
Finding
`pydantic>=2.7.0` is unpinned, so installations are not reproducible and may silently pull in later versions with security or compatibility regressions. Although this is usually a supply-chain hygiene issue rather than an immediately exploitable bug, it still increases operational and security risk.

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
92% confidence
Finding
`pydantic-settings>=2.2.0` is unpinned, creating dependency drift and preventing deterministic builds. For a service likely loading configuration from environment or files, unexpected upstream changes could affect validation and configuration handling in security-relevant ways.

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
92% confidence
Finding
`python-dotenv>=1.0.1` is not pinned, so future installs may fetch unreviewed versions and produce inconsistent environments. Since dotenv libraries influence configuration loading, supply-chain or behavior changes can affect secrets handling and startup behavior.

Known Vulnerable Dependency: requests==2.31.0 — 3 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)

Low
Category
Supply Chain
Confidence
96% confidence
Finding
The requirements permit `requests` 2.31.0, and the finding notes multiple advisories affecting that version. This is more relevant than a generic library issue because the skill explicitly fetches RFC documents from `ietf.org`, making HTTP client behavior central to the service; flaws involving credential leakage or improper TLS verification can directly affect outbound network security if affected code paths are used.

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
82% confidence
Finding
The dependency range includes `python-dotenv` 1.0.1, which is flagged with an advisory for symlink-following file overwrite in `set_key`. The skill context makes this somewhat less dangerous unless the service actually calls `set_key` on attacker-influenced paths, but it remains a real vulnerable dependency because configuration tooling often touches sensitive files in deployment environments.

Static analysis

No suspicious patterns detected.