T09 · Insecure Skill Coding Practices
- Location
infra/tools/inbound-form.ts:150- Finding
Public Form Content Is Injected into Internal Slack Markdown
- Content
View full analysis
Vulnerability Details
File Location:
infra/tools/inbound-form.ts, lines 150–156
Vulnerability Type: Untrusted Slack Markdown Injection
Risk Level: Mediumts uses.slack.postMessage({ channelId: slackChannelId, format: "markdown", disableUnfurling: true, body: `*New inbound${qualified ? ", qualified" : ""}* from ${input.first_name} ${input.last_name} at ${company.company_name ? company.company_name : domain} (${domain})\n${company.employee_count} employees, ${company.hq_country}\n${input.message}\n\nPage: ${input.page_url}`, });Technical Analysis
The public workflow accepts visitor-controlled
first_name,last_name, andmessagestrings through the schema atinfra/tools/inbound-form.ts:59–71. These values have no relevant character restrictions or length limits and are interpolated directly into a Slack message configured withformat: "markdown".Consequently, Slack interprets rather than merely displays supported markup supplied by an external visitor. An attacker can submit formatting, deceptive links, and Slack mention constructs that alter the appearance or notification behavior of the internal message. The trusted prefix does not separate attacker-controlled content into a plain-text field.
Setting
disableUnfurling: trueonly controls link previews; it does not escape Markdown, neutralize links, or suppress mention parsing. The configured origin allowlist, honeypot, minimum-fill timer, and rate limit reduce automated abuse but do not sanitize a submission accepted from the legitimate website.This is an ordinary exploitable coding flaw. The reviewed evidence does not indicate that the project author intentionally introduced the injection behavior.
Attack Path
- An external attacker opens the legitimate public contact page, satisfying the configured origin restriction.
- The attacker waits longer than
minFillMillisand submits a syntactically valid non-free ema ...[truncated 1192 chars]
- Remediation
View remediation
Remediation Suggestions
- Send all visitor-controlled fields through Slack plain-text blocks or another API field that does not interpret Markdown.
- If Markdown is required for trusted labels, escape Slack control characters in every untrusted value before interpolation and neutralize mention and link constructs.
- Keep trusted formatting separate from visitor-provided values rather than constructing one Markdown string.
- Add server-side maximum lengths for names, messages, and URL-derived fields to limit notification abuse.
- Add tests using mention syntax, formatted links, markup delimiters, and oversized values, verifying that Slack renders them as inert text.
- Retain the existing origin restriction, honeypot, minimum-fill timer, and rate limit as defense-in-depth; they should not replace output encoding.
