T09 · Insecure Skill Coding Practices
- Location
SKILL.md:141- Finding
Local Preview Server Binds to All Network Interfaces
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 141
Vulnerability Type: Network exposure caused by an insecure local testing command
Risk Level: MediumVulnerable Code Snippet
markdown The "test it locally" step is `python3 -m http.server 8000` from the directory containing the file, then open it in a browser.Technical Analysis
The recommended command starts Python's basic HTTP server on port 8000. Unless a bind address is specified, the server listens on all available network interfaces rather than only the loopback interface.
The server exposes the directory from which it is started, including its descendants. If the command is run from a directory containing unrelated artifacts, source documents, generated drafts, or sensitive files, those files may become remotely accessible to other systems capable of reaching port 8000.
The server itself does not grant operating-system privileges or allow arbitrary command execution. Exploitation requires network reachability while the temporary server is running, and the exposed scope is generally limited to files readable by the process beneath the selected serving directory.
Attack Path
- The agent or user follows the documented preview procedure.
- The command is run from the output directory, or accidentally from a broader directory containing additional files.
- Python binds the HTTP server to all available network interfaces on port 8000.
- An attacker on a reachable network discovers or already knows the host and port.
- The attacker requests known file paths or browses directory listings.
- The server returns files located within the exposed directory tree until it is terminated.
Impact Assessment
A reachable attacker could read files served beneath the selected directory with the permissions of the HTTP-server process. Potentially exposed content includes generated explainers, source materials copied into the directory, drafts, and other inadvertently ...[truncated 271 chars]
- Remediation
View remediation
Remediation Suggestions
Bind the preview server explicitly to the loopback interface:
bash python3 -m http.server 8000 --bind 127.0.0.1Apply the following additional hardening measures:
- Run the command only from a dedicated output directory containing the generated
index.htmland no unrelated files. - Verify the working directory before starting the server, for example with
pwdandfind . -maxdepth 2 -type f. - Stop the server immediately after testing.
- Do not disable host firewall protections or expose port 8000 through containers, virtual machines, tunnels, or router forwarding.
- Update the documented instruction to state that the server is for loopback-only development use.
- When serving is unnecessary, open the self-contained HTML file directly in the browser instead.
- Run the command only from a dedicated output directory containing the generated
