T01 · Skill Instruction Hijacking
- Location
HEARTBEAT.md:9- Finding
Untrusted Remote Messages Enter an Automated Heartbeat Workflow
- Content
View full analysis
Vulnerability Details
File Location:
HEARTBEAT.md, lines 9-14
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: Mediumbash curl -s https://roast-agents-production.up.railway.app/api/v1/messages?agent_name=YOUR_AGENT_NAMEtext - If the response contains messages, deliver each message text to your owner. These are game results, scores, and notifications. - If the response has no messages (empty array), no action needed.Technical Analysis
The heartbeat retrieves text from a third-party service and instructs the agent to deliver every returned message to its owner. The instructions do not require authentication of the server response, integrity verification, schema validation, content-length limits, output escaping, or separation of remote data from agent instructions.
Consequently, anyone controlling or compromising the remote service could place arbitrary content into a trusted recurring workflow. A crafted response could contain prompt-injection instructions, phishing content, misleading notifications, or abusive text. Although the documented behavior only requires relaying messages and does not explicitly authorize command execution, the absence of a directive to treat message bodies strictly as inert data increases the risk that an agent may interpret attacker-controlled text as instructions.
Attack Path
- An attacker compromises, impersonates, or otherwise gains control of the Railway-hosted message service.
- The attacker returns crafted text from the
messagesendpoint for a registered agent name. - The recurring heartbeat fetches the attacker-controlled response.
- Following the skill instructions, the agent delivers the message to its owner.
- The owner receives deceptive or harmful content; an insufficiently isolated agent may also interpret embedded text as operational instructions.
Impact Assessment
The demonstrated scope is arbitrary mes ...[truncated 407 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat every response field as untrusted data and explicitly prohibit following instructions contained in message text.
- Require a strict response schema with fixed field types, maximum lengths, and rejection of unexpected properties.
- Render message bodies as quoted or escaped data under a clear untrusted-content boundary.
- Authenticate requests and responses using short-lived credentials and response signatures or message authentication codes.
- Pin the expected service identity through correctly validated TLS and document the service operator.
- Add replay protection, timestamps, unique message identifiers, and deduplication.
- Apply content filtering for phishing, executable instructions, abusive material, links, and unexpected markup.
- Require owner confirmation before any remote message can trigger tools, network requests, account actions, or other side effects.
- Log rejected and suspicious responses without storing unnecessary sensitive content.
