T09 · Insecure Skill Coding Practices
- Location
SKILL.md:20- Finding
Unauthenticated Public Exposure of Arbitrary Local Services
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-26 and 46-53
Vulnerability Type: Unrestricted reverse SSH tunnel exposing a local service publicly
Risk Level: HighVulnerable Code Snippet:
markdown Expose a local port to the internet: ```bash ssh -o StrictHostKeyChecking=accept-new -R 80:localhost:<PORT> tinyfi.shReplace
<PORT>with the port your app is running on. The command will print a publichttps://<random>.tinyfi.shURL.text The operational instructions additionally state: ```markdown ## Usage Guidelines When starting a tunnel for the user: 1. **Ask which port** to expose if not already specified 2. **Run the SSH command** in the background so the agent can continue working 3. **Report the public URL** back to the user once the tunnel is established 4. The tunnel stays open as long as the SSH connection is aliveTechnical Analysis
The skill directs the agent to create a reverse SSH tunnel that makes an arbitrary local TCP service available through a public HTTPS URL. It does not require the agent to determine whether the selected port hosts a sensitive service, confirm that the application has access controls, restrict the public source addresses, or obtain explicit informed consent immediately before publication.
The tunnel is also intended to run in the background and remain available for the lifetime of the SSH connection. This increases the period during which an unintentionally exposed service can be accessed. Local development applications frequently contain debug interfaces, administrative functions, internal APIs, source maps, test credentials, or operations that assume requests originate from a trusted local system.
Attack Path
- A user or agent selects a port containing a local development, administration, debug, or internal service.
- The agent runs the documented reverse SSH command.
tinyfi.shassigns ...[truncated 1170 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit confirmation that clearly identifies the local port, detected service, public hostname, expected duration, and unauthenticated-public-access risk.
- Inspect the target port before opening the tunnel and refuse known-sensitive services by default, including databases, SSH, remote desktop, container control sockets, debugging ports, and unauthenticated administration interfaces.
- Require application-level authentication before exposing a service. Prefer a tunneling provider that supports authenticated access, source-IP restrictions, or identity-aware access policies.
- Bind the forwarding target explicitly to
127.0.0.1and verify that it is the intended service. - Use a defined timeout instead of leaving the background process active indefinitely, and provide a command or process identifier for immediate termination.
- Record and report when the tunnel starts and stops so the user can verify that public exposure has ended.
- Warn users not to expose applications containing production data, secrets, debug consoles, or privileged administrative functions.
