T09 · Insecure Skill Coding Practices
- Location
SKILL.md:204- Finding
Local Development Server Exposes Files on All Network Interfaces
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:204
Vulnerability Type: Unrestricted network binding and unintended file disclosure
Risk Level: MediumVulnerable Code Snippet:
bash python3 -m http.server 8000Technical Analysis
Python's built-in
http.serverbinds to all available network interfaces by default. It serves files from the current working directory and ordinarily provides directory listings when no index file is present.If a user runs this instruction from a repository root or another directory containing source code, configuration files, build artifacts, backups, or accidentally stored credentials, those files may become accessible through TCP port 8000. Exposure depends on host firewall rules, container or virtual-machine networking, router configuration, and whether an attacker can reach the host.
The command does not itself provide arbitrary code execution or elevate privileges. An attacker can only access files exposed beneath the selected serving directory and readable by the server process.
Attack Path
- A user follows the documented local-validation instruction from a project directory.
python3 -m http.server 8000starts an unauthenticated server listening on all network interfaces.- The host permits inbound access to TCP port 8000 from another system.
- An attacker discovers the service by network scanning, local network observation, or knowledge of the host address.
- The attacker requests
/and uses generated directory listings to enumerate accessible files. - The attacker downloads exposed source code, configuration files, backups, or other content under the served directory.
Impact Assessment
A reachable attacker may obtain unauthenticated read access to files beneath the directory from which the command was started. Potential consequences include source-code disclosure, exposure of application configuration, leakage of credentials acc ...[truncated 331 chars]
- Remediation
View remediation
Remediation Suggestions
Bind the server explicitly to the loopback interface and serve only a dedicated directory containing public development assets:
bash python3 -m http.server 8000 --bind 127.0.0.1 --directory ./publicApply the following additional hardening measures:
- Instruct users never to serve a repository root, home directory, or directory containing secrets.
- Ensure the selected public directory excludes environment files, credentials, source maps containing sensitive source content, backups, and private configuration.
- Document that
http.serveris intended only for temporary local development and does not provide authentication, TLS, or production-grade security. - Require firewall restrictions if access from another development device is necessary.
- Stop the server immediately after validation.
