T09 · Insecure Skill Coding Practices
Error
- Location
SKILL.md:4- Finding
Unenforced Loopback Restriction May Expose the Mailbox Bearer Token
- Content
View full analysis
- Remediation
View remediation
/mcp` - `http://localhost:/mcp` 3. Reject: - Non-HTTP schemes. - Non-loopback IP addresses. - Hostnames that resolve to any non-loopback address. - URLs containing user-information components. - Unexpected paths, query strings, or fragments. - Ambiguous or alternative IP representations that could bypass string-based checks. 4. Disable redirects, or revalidate every redirect destination and strip the `Authorization` header before following it. Credentials must never be forwarded to a different origin. 5. Prefer removing endpoint configurability if custom ports are the only required variation. Store the port separately and construct the loopback URL internally. 6. Fail closed when URL parsing, DNS resolution, or loopback validation is inconclusive. 7. Add automated negative tests covering external hosts, IPv6 addresses, encoded hostnames, redirects, DNS rebinding scenarios, and malformed URLs. 8. Rotate `MAILBIRD_MCP_TOKEN` immediately if it may have been transmitted to an untrusted endpoint. ]]>
