T09 · Insecure Skill Coding Practices
- Location
scripts/save_to_flomo.sh:24- Finding
Flomo Webhook Secret Disclosure Through Curl Debug Logging
- Content
View full analysis
Vulnerability Details
File Location:
scripts/save_to_flomo.sh, lines 24-25 and 33-39
Vulnerability Type: Sensitive URL disclosure through verbose diagnostic output
Risk Level: MediumVulnerable Code:
bash if [[ "${FLOMO_DEBUG:-}" != "" ]]; then echo "[flomo-notes] payload_bytes=$(printf %s "$JSON_PAYLOAD" | wc -c | tr -d ' ')" >&2 echo "[flomo-notes] posting to FLOMO_WEBHOOK_URL (redacted)" >&2 fi curl -sS -X POST "$FLOMO_WEBHOOK_URL" \ -H "Content-type: application/json" \ -d "$JSON_PAYLOAD" \ ${FLOMO_DEBUG:+-v} \ >/dev/nullTechnical Analysis
FLOMO_WEBHOOK_URLcontains a secret Flomo inbox token in its URL path. WhenFLOMO_DEBUGis nonempty,${FLOMO_DEBUG:+-v}enables curl's verbose mode.Although the preceding diagnostic message says that the URL is redacted,
curl -vindependently writes request diagnostics to standard error. These diagnostics can include the complete request URL, including the secret webhook path. Standard error is commonly collected by OpenClaw gateways, service managers, CI systems, containers, and centralized logging platforms.The issue does not require shell command injection. It occurs through the normal debug feature whenever the environment variable is enabled or inherited.
Attack Path
- A user, administrator, or execution environment sets
FLOMO_DEBUGto any nonempty value. - The skill invokes
scripts/save_to_flomo.shwith a configuredFLOMO_WEBHOOK_URL. - The parameter expansion adds
-vto the curl command. - Curl emits verbose request information to standard error.
- The gateway, service, or CI logging system records that output.
- An attacker or unauthorized operator with access to those logs obtains the webhook URL.
- The attacker sends arbitrary POST requests to the exposed webhook and injects unauthorized content into the victim's Flomo inbox.
Impact Assessment
Exploitation does ...[truncated 553 chars]
- A user, administrator, or execution environment sets
- Remediation
View remediation
Remediation Suggestions
- Remove
${FLOMO_DEBUG:+-v}and never use curl verbose mode with a credential embedded in the URL. - Implement bounded diagnostics that do not print request URLs or headers. For example, capture only the HTTP status code with
--write-out '%{http_code}'. - If endpoint diagnostics are necessary, log only a fixed service name such as
flomoapp.com; do not log the webhook path, query string, or token. - Ensure error-handling paths also redact the URL before writing messages to standard error.
- Treat existing debug logs as potentially compromised. Delete or restrict affected logs and rotate the Flomo webhook if verbose mode has previously been used.
- Add an automated test that enables
FLOMO_DEBUG, captures standard error, and verifies that neither the webhook token nor the complete URL appears in output.
- Remove
