Back to skill

Security audit

Scholar Access 学术通道

Security checks for vulnerabilities and agentic risk

Overview

This skill reroutes web traffic through a custom proxy path and tells users to bypass HTTPS protections, so it should be reviewed carefully before installation.

Only install this if you understand and trust the Scholar proxy path and bundled CA. Do not send reusable credentials, private repository access tokens, or sensitive sessions through it; avoid the documented TLS-disable flags; keep the proxy bound to 127.0.0.1; stop it after use; and prefer pinned images or verified downloads.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:64
Finding
TLS Certificate Verification Is Explicitly Disabled in Documented Workflows<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 64–66 and line 113 **Vulnerability Type**: TLS endpoint authentication bypass **Risk Level**: High ### Vulnerable Code ```bash GIT_SSL_NO_VERIFY=1 git clone https://github.com/<owner>/<repo>.git # When finished: unset https_proxy http_proxy ``` A second diagnostic example also disables verification: ```bash curl -sk --resolve github.com:443:205.164.50.200 https://github.com/ | head -c 200 ``` The documentation additionally suggests the following insecure curl option at line 55: ```bash # or skip verification: curl --resolve "github.com:443:$IP" -k https://github.com/... ``` ### Technical Analysis `GIT_SSL_NO_VERIFY=1` and curl's `-k`/`--insecure` option disable validation of the server certificate and therefore remove TLS endpoint authentication. Encryption may still occur, but the client can no longer reliably determine whether it is communicating with the intended proxy or an impersonating endpoint. This is especially significant because the Skill deliberately routes connections through an external reverse proxy that terminates TLS using the bundled Scholar root CA. Although `scholar-fetch.sh` uses that CA, the documented Git and generic proxy workflows instead instruct users to bypass certificate verification entirely. The setting shown for Git is scoped to the individual command, but all HTTPS operations initiated by that command inherit the bypass. Such operations may include redirects, Git authentication, and repository object transfers. ### Attack Path 1. A user starts `scholar-proxy.py` and follows the documented Git or curl workflow. 2. The user invokes Git with `GIT_SSL_NO_VERIFY=1` or curl with `-k`. 3. An attacker able to influence DNS, routing, the local network, or the proxy endpoint presents an untrusted certificate. 4. The client accepts the certificate because verification has been disabled. 5. The attacker relays, observes, or modifies the HTTPS traffic. 6. Rep ...[truncated 756 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all recommendations to use `GIT_SSL_NO_VERIFY=1`, curl `-k`, or `--insecure`. 2. Configure each client to trust only the bundled CA where use of the Scholar proxy is explicitly intended. For Git, use a command-scoped CA configuration such as: ```bash git -c http.sslCAInfo="$PWD/scholar-root-ca.pem" clone https://github.com/owner/repo.git ``` 3. Avoid installing the bundled root CA into the operating system's global trust store. Use per-command or per-host trust configuration to minimize its authority. 4. Clearly disclose that the reverse proxy terminates TLS and can observe or modify plaintext traffic. 5. Recommend avoiding transmission of reusable credentials through the proxy. Where authentication is unavoidable, use narrowly scoped and short-lived credentials. 6. Remove the insecure diagnostic example or replace it with a command that supplies `--cacert scholar-root-ca.pem`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scholar-proxy.py:104
Finding
Configurable Unauthenticated CONNECT Proxy Allows Arbitrary Outbound Connections<![CDATA[ ## Vulnerability Details **File Location**: `scholar-proxy.py`, lines 104–108 and 151–155 **Vulnerability Type**: Unauthenticated open proxy and server-side request forgery exposure **Risk Level**: Medium ### Vulnerable Code The handler accepts a client-controlled destination host and port without an allowlist or network-range validation: ```python line = data.split(b"\r\n", 1)[0].decode(errors="replace") _, target, _ = line.split(" ", 2) host, port = target.rsplit(":", 1) port = int(port) ``` The listening address is user-configurable, including non-loopback addresses: ```python ap.add_argument("--listen", default="127.0.0.1:1080", help="bind address:port (default 127.0.0.1:1080)") args = ap.parse_args() host, port = args.listen.rsplit(":", 1) with ThreadedServer((host, int(port)), ConnectHandler) as server: print(f"scholar-proxy listening on {host}:{port}", flush=True) server.serve_forever() ``` ### Technical Analysis The default `127.0.0.1:1080` binding limits access to the local machine, which reduces the default attack surface. However, the `--listen` option accepts arbitrary interfaces, including `0.0.0.0` or an externally reachable address, without requiring authentication or an explicit unsafe-mode confirmation. The CONNECT request controls both the destination hostname and port. The implementation does not: - Restrict destinations to the documented academic domains. - Restrict connections to port 443. - Block loopback, private, link-local, multicast, or cloud metadata addresses. - Authenticate clients. - Apply connection or thread limits beyond socket timeouts. Consequently, when bound to a network-accessible interface, the program acts as an unauthenticated general-purpose TCP relay. Because connections originate from the machine running the Skill, clients can potentially target services accessible from that machine but inaccessible from the clients' own networks. ### Attack Path 1. An operator starts the proxy with a netw ...[truncated 1375 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Enforce loopback-only operation unless a separately named and prominently documented unsafe mode is selected. 2. Reject bind addresses other than `127.0.0.1` and `::1` in the normal operating mode. 3. Allowlist the specific domains required by the Skill's declared functionality. 4. Restrict CONNECT requests to port 443 unless another port is explicitly required and approved. 5. Resolve destinations before connecting and reject all loopback, private, link-local, multicast, unspecified, reserved, and metadata addresses. Perform this validation on every resolved address to mitigate DNS rebinding. 6. If remote access is a legitimate requirement, add strong client authentication, encrypted transport to the local proxy, access-control lists, rate limits, connection limits, and audit logging. 7. Add conservative request-size, header, connection-duration, and concurrent-thread limits. 8. Document that exposing the service using `0.0.0.0` or another non-loopback address can create an open proxy. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scholar-proxy.py:84
Finding
Scholar Proxy Network Restriction Is Declared but Not Enforced<![CDATA[ ## Vulnerability Details **File Location**: `scholar-proxy.py`, lines 84–89 **Vulnerability Type**: Unvalidated DNS-controlled connection destination **Risk Level**: Medium ### Vulnerable Code The expected Scholar proxy network is declared: ```python PROXY_NET = "205.164.50." # scholar reverse-proxy farm ``` However, `dial_target()` accepts any IPv4 address returned by the external DNS-over-HTTPS service: ```python def dial_target(host: str, port: int) -> socket.socket: """Connect to `host:port`, preferring the scholar proxy IP when applicable.""" ip = doh_resolve(host) if ip: return socket.create_connection((ip, port), timeout=20) # fall back to the OS resolver (works for non-blocked / non-proxied hosts) infos = socket.getaddrinfo(host, port, socket.AF_INET, socket.SOCK_STREAM) ``` ### Technical Analysis The code and documentation identify `205.164.50.0/24` as the Scholar reverse-proxy network. Unlike `scholar-fetch.sh`, which checks that the result starts with `205.164.50.`, `scholar-proxy.py` does not enforce this condition. The `PROXY_NET` constant is unused. As a result, any A record returned by `https://doh.scholar.work/dns-query` is treated as an approved connection destination. This behavior differs from the documented mechanism of using the Scholar proxy only when a host maps to the designated proxy range and otherwise resolving it normally. The external DoH service therefore controls the destination IP used for each CONNECT request. A compromised service, malformed response, operational error, or malicious DNS result could redirect the connection to an attacker-controlled or internal address. Although TLS verification by the downstream client may mitigate impersonation when correctly enabled, the documentation's recommendation to disable TLS verification materially weakens that protection. The DNS parser also does not verify that the response transaction ID, question name, and question type match the req ...[truncated 1357 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate Scholar DoH results using the `ipaddress` module and accept them as proxy destinations only when they are members of `205.164.50.0/24`. 2. If the response is absent or outside the approved range, use the operating system resolver as described in the Skill documentation rather than connecting directly to the DoH-provided address. 3. Reject private, loopback, link-local, multicast, unspecified, reserved, and metadata addresses before establishing any connection. 4. Validate the DNS response transaction ID, response flags, question name, question type, section lengths, and record bounds before using an answer. 5. Consider requiring an allowlisted hostname in addition to an approved proxy IP. 6. Preserve TLS verification in every downstream-client workflow so an incorrect destination cannot successfully impersonate the requested hostname. 7. Add automated tests confirming that non-`205.164.50.0/24` DoH answers are never treated as Scholar proxy endpoints. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill claims compliant access through an official academic proxy and presents reverse-engineered TLS interception mechanics, bundled CA trust, and proxying guidance, while the analyzed file does not substantiate those claims. This mismatch is dangerous because it can socially engineer users or agents into trusting a custom CA, bypassing normal routing, and disabling certificate verification based on unverified assertions of legitimacy.

Ae1

High
Category
analysis-evasion
Content
./scholar-fetch.sh https://github.com/torvalds/linux/archive/refs/heads/master.tar.gz -o linux.tar.gz
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scholar-fetch.sh https://github.com/torvalds/linux/archive/refs/heads/master.tar.gz -o linux.tar.gz
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scholar-fetch.sh https://github.com/torvalds/linux/archive/refs/heads/master.tar.gz -o linux.tar.gz
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
IP=$(./scholar-resolve.py github.com | head -n1)   # e.g. 205.164.50.200
curl --resolve "github.com:443:$IP" --cacert scholar-root-ca.pem https://github.com/...
# or skip verification:  curl --resolve "github.com:443:$IP" -k https://github.com/...
```
Confidence
98% confidence
Finding
The combination of `curl --resolve` to force traffic to an arbitrary IP, a bundled custom CA, and fallback to `-k` gives the skill the ability to redirect ostensibly trusted HTTPS requests to a different endpoint while suppressing normal authenticity checks. This is effectively a man-in-the-middle enablement pattern and is particularly dangerous here because the skill is framed as an official, compliant access mechanism to induce trust.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Why this exists:
    `scholartools` installs a system-wide local DNS (127.0.0.1:53) + a root CA so
    that git / docker / curl transparently reach github.com & friends. That needs
    root. This script provides the same routing as a *user-space* CONNECT proxy,
    so tools can reach proxied domains without touching /etc/hosts or /etc/resolv.conf.
Confidence
70% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
The usage examples explicitly tell users to disable TLS certificate verification with GIT_SSL_NO_VERIFY=1 and curl -k. That trains users to bypass HTTPS authenticity checks, enabling man-in-the-middle interception and credential theft when accessing GitHub or other sensitive services through untrusted or compromised networks/proxies.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill explicitly instructs the agent to perform network and shell actions, including running scripts, setting proxy environment variables, and launching background processes, but it does not declare any tool scope or permission boundaries. This increases the risk that an agent will execute privileged connectivity changes without clear user consent or policy enforcement.

Natural-Language Policy Violations

Medium
Confidence
78% confidence
Finding
The file prominently frames the skill around the Chinese education network and presents the capability as applicable for any Agent, but it does not explicitly offer users a locale choice or state that the skill is restricted to users in that region by policy or compliance need. Under the policy rule, a locale-specific constraint should either be opt-in or clearly justified as region-specific.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
```bash
IP=$(./scholar-resolve.py github.com | head -n1)   # e.g. 205.164.50.200
curl --resolve "github.com:443:$IP" --cacert scholar-root-ca.pem https://github.com/...
# or skip verification:  curl --resolve "github.com:443:$IP" -k https://github.com/...
```

## git clone / git pull (no root)
Confidence
97% confidence
Finding
The skill explicitly recommends skipping TLS verification with `-k`, which defeats certificate validation and enables man-in-the-middle interception or impersonation of remote services. In the context of a custom reverse-proxy and bundled private CA, this is especially dangerous because it normalizes bypassing the only mechanism that would detect a malicious or misconfigured endpoint.

Session Persistence

Medium
Category
Rogue Agent
Content
plain `https_proxy` works:

```bash
nohup ./scholar-proxy.py --listen 127.0.0.1:1080 > /tmp/scholar-proxy.log 2>&1 &
export https_proxy=http://127.0.0.1:1080 http_proxy=http://127.0.0.1:1080
GIT_SSL_NO_VERIFY=1 git clone https://github.com/<owner>/<repo>.git
# When finished:
Confidence
88% confidence
Finding
Starting a background proxy with `nohup` creates session-persistent network redirection that may continue affecting subsequent commands beyond the user's immediate intent. In this skill, that persistence is more dangerous because the proxy is specifically meant to reroute access to blocked external domains and could silently alter later git, Docker, or HTTPS traffic.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
Using `docker pull nginx` without a version tag or digest causes retrieval of the mutable `latest` image, which can change over time and may introduce unexpected or malicious contents through supply-chain compromise. In a skill that already routes traffic through an alternate proxy path, this weakens provenance and makes downstream execution less trustworthy.

Missing User Warnings

Low
Confidence
80% confidence
Finding
This code makes network requests to the external DoH endpoint and then opens outbound connections to resolved targets, but the running proxy only prints its listen address and does not disclose these external network actions at runtime. For a code-file warning check, there is no confirmation prompt or user-facing log near the operations themselves.

Static analysis

No suspicious patterns detected.