T09 · Insecure Skill Coding Practices
- Location
SKILL.md:33- Finding
Unfiltered Internal Error Disclosure to Telegram Users
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 33-35
Vulnerability Type: Information disclosure through verbose error handling
Risk Level: LowVulnerable Code:
javascript } catch (err) { await context.reply("Error during marketing audit: " + err.message); }Technical Analysis
The handler directly concatenates the exception message from the downstream
marketing-orchestratorskill into a Telegram response. Exception messages are intended for diagnostics and may contain internal service names, filesystem paths, request details, collector or API responses, and other operational information.Because the error is returned without filtering or mapping it to a safe user-facing message, any Telegram user permitted to invoke this command may receive internal diagnostic details when an input or downstream condition causes an exception. The reviewed code does not establish that secrets are necessarily present in these messages, so direct credential disclosure is not confirmed.
Attack Path
- An attacker with access to the
/marketing_auditcommand submits malformed, edge-case, or failure-inducing values forinstagramHandleorwebsiteDomain. - The handler passes those values to
marketing-orchestrator. - The orchestrator or one of its collectors throws an exception containing diagnostic details.
- The
catchblock reads the exception'smessageproperty without sanitization. - The complete message is sent to the attacker through Telegram.
- The attacker may repeat the process with different inputs to collect operational information for reconnaissance.
Impact Assessment
Successful exploitation is limited to information exposed by downstream exception messages. A user may learn internal implementation details, service identifiers, filesystem paths, request information, or third-party API error content. This can facilitate reconnaissance and help refine later attacks, b ...[truncated 134 chars]
- An attacker with access to the
- Remediation
View remediation
Remediation Suggestions
Return a generic error to Telegram users and send detailed exception information only to an access-controlled logging system:
javascript } catch (err) { context.logger?.error({ err }, "Marketing audit failed"); await context.reply("The marketing audit failed. Please try again later."); }Additionally:
- Avoid including raw exception messages, stack traces, API responses, paths, or request details in user-facing replies.
- Assign a non-sensitive correlation identifier to each failure so operators can locate the corresponding server-side log entry.
- Configure production logging to redact API keys, authorization headers, tokens, cookies, and user-supplied sensitive data.
- Validate and normalize
instagramHandleandwebsiteDomainbefore forwarding them to the orchestrator to reduce avoidable downstream failures. - Restrict command access where appropriate and apply rate limits to make repeated error probing more difficult.
