T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:40
- Finding
- Unauthenticated Development Server Exposed on All Network Interfaces<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:40`; `README.md:63` **Vulnerability Type**: Exposed development service with no access control **Risk Level**: Medium ### Complete Code Snippet `SKILL.md:40`: ```bash curl http://localhost:8000/ || (cd ~/.openclaw/workspace/skills/yfinance && uvicorn main:app --host 0.0.0.0 --port 8000 --reload &) ``` `README.md:63`: ```bash uvicorn main:app --host 0.0.0.0 --port 8000 --reload ``` ### Technical Analysis The documented startup procedure binds Uvicorn to `0.0.0.0`, making the service reachable through every available network interface rather than only through localhost. It also enables `--reload`, which is a development feature that monitors the source tree and restarts the application when files change. The application implements no authentication, authorization, request throttling, or concurrency controls. All API callers can invoke operations that generate outbound Yahoo Finance requests and process potentially large historical datasets. This configuration exceeds the minimum network privileges required by the declared Skill functionality because `SKILL.md` and `openapi.json` otherwise use `http://localhost:8000`. Although no direct remote-code-execution path was identified, exposing a development server unnecessarily expands the reachable attack surface. ### Attack Path 1. A user starts the Skill using the documented command. 2. Uvicorn listens on port 8000 on every network interface. 3. A remote party that can route traffic to the host discovers the open port. 4. The party repeatedly invokes endpoints such as `/history`, `/fundamentals`, or `/price`. 5. Each request causes local processing and outbound requests through `yfinance`. 6. Sustained requests consume host resources and Yahoo Finance rate limits, potentially degrading or denying service to legitimate users. ### Impact Assessment An attacker does not obtain operating-system privileges from this issue alone. However, a network ...[truncated 310 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Bind the default server to localhost: ```bash uvicorn main:app --host 127.0.0.1 --port 8000 ``` - Remove `--reload` from all ordinary and production startup instructions. - If remote access is required, place the service behind an authenticated reverse proxy with TLS. - Restrict inbound traffic through host and cloud firewalls to explicitly trusted clients. - Add request rate limits, concurrency limits, timeouts, and response-size limits. - Validate ticker lengths and allow only documented values for `period` and `interval`. - Clearly separate local-development instructions from hardened remote-deployment instructions. ]]>
