T09 · Insecure Skill Coding Practices
- Location
scripts/start_pdf_server.py:163- Finding
Unauthenticated PDF Server Binds to All Network Interfaces by Default
- Content
View full analysis
3: host = sys.argv[3] else: # Default to all interfaces (accessible from any IP) host = "0.0.0.0" # Handle "内网" or "private" alias if host.lower() in ['内网', 'private', 'lan']: # Still listen on 0.0.0.0 for all interfaces # User can access from any private IP host = "0.0.0.0" start_server(port, host) ``` ### Technical Analysis The PDF server binds to `0.0.0.0` by default, making it reachable through every configured network interface. The `private`, `lan`, and equivalent alias also maps to `0.0.0.0`; it does not technically restrict traffic to private address ranges. The request handler does not implement authentication or per-document authorization. Disabling directory listings reduces casual discovery but does not prevent access to a known or guessed filename. Citation-key filenames are generated from predictable author, year, and title components, so they are not suitable as access-control tokens. Serving PDFs to other intranet devices is part of the declared optional functionality, but binding to all interfaces without authentication exceeds the minimum privilege required for local Zotero use. ### Attack Path 1. A user starts the server using the documented command or omits the host argument. 2. The server binds to all interfaces on the selected port. 3. A local-network attacker, or an internet attacker where firewall or N ...[truncated 584 chars]- Remediation
View remediation
