T06 · System Persistence
- Location
SKILL.md:120- Finding
Persistent Cloudflare Connector Service Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:120
Vulnerability Type: Persistent system-service installation
Risk Level: HighVulnerable Code:
markdown | `npx cftunnel run <tunnel-id> --install-service` | Install cloudflared as a persistent system service (survives reboots). |Technical Analysis
The skill explicitly instructs the agent to install
cloudflaredas a system service that survives reboots. This changes persistent operating-system state and extends execution beyond the lifetime of the initiating agent session.A persistent tunnel connector may continue forwarding public traffic to configured local services without continued agent supervision. The documentation does not require explicit user confirmation, least-privileged service credentials, route expiration, or automatic removal of the installed service.
Attack Path
- An agent configures a Cloudflare tunnel and one or more ingress routes.
- The agent invokes
npx cftunnel run <tunnel-id> --install-service. cloudflaredis registered as a persistent operating-system service.- The service starts independently of the original agent session and may restart after reboot.
- Configured local services remain reachable through the tunnel until the service and routes are explicitly removed.
Impact Assessment
Successful use creates a cross-session network service on the host. The connector can preserve external access to local applications after the original task has ended and after system restarts.
The precise operating-system privileges depend on how the command is executed and how
cloudflaredperforms service installation. The resulting exposure includes every local service configured in the tunnel's ingress rules. Compromise of the tunnel credentials, Cloudflare account, or exposed backend could extend the impact to unauthorized remote access.- Remediation
View remediation
Remediation Suggestions
- Remove the persistent
--install-serviceworkflow from the skill. - Run the connector in the foreground so its lifetime is bounded by the initiating session.
- Require explicit, informed user approval before making persistent operating-system changes.
- If persistence is operationally necessary, use a dedicated unprivileged service account and a narrowly scoped Cloudflare API token.
- Add documented teardown procedures that stop, disable, and uninstall the service and remove associated ingress and DNS records.
- Implement route expiration and periodic review of active connectors.
- Require confirmation of the exact hostnames and local services that will remain accessible after reboot.
- Remove the persistent
