T09 · Insecure Skill Coding Practices
- Location
scripts/flomo-add.py:56- Finding
Unrestricted Outbound Webhook Destination
- Content
View full analysis
Vulnerability Details
File Location:
scripts/flomo-add.py, lines 56-72
Vulnerability Type: Unvalidated outbound request destination
Risk Level: MediumRelevant Code:
python url = (args.url or config.get("url", "")).strip()python response = requests.post(url, json=payload, headers=headers, timeout=15)Technical Analysis
The script accepts a destination from either the
--urlargument or theurlconfiguration entry and passes it directly torequests.post. It only verifies that the value is nonempty. It does not require HTTPS, restrict the hostname to an authorized flomo domain, reject local or private-network addresses, or constrain redirects.Consequently, anyone able to influence the command arguments or
.flomo.configcan direct memo content to an arbitrary server. Because therequestslibrary follows redirects by default, an initially acceptable URL could also redirect the request to another destination unless redirects are disabled or each redirect target is validated.Attack Path
- An attacker modifies
.flomo.config, supplies a prepared invocation, or persuades the user to use--urlwith an attacker-controlled address. - The user invokes the Skill with sensitive memo content.
- The script accepts the address because it is nonempty.
- The script sends the memo in a JSON POST request to the attacker-controlled server.
- Alternatively, the supplied destination can reference a reachable internal service, resulting in a limited server-side request forgery primitive.
Impact Assessment
An attacker can receive the complete memo content submitted during the affected invocation. A plaintext HTTP destination can also expose that content to network interception.
The script may issue POST requests to internal, loopback, private, or link-local endpoints accessible from the host. This does not directly grant command execution or elevated privileges, but i ...[truncated 220 chars]
- An attacker modifies
- Remediation
View remediation
Remediation Suggestions
- Parse the destination with a standard URL parser and reject malformed URLs.
- Require the
httpsscheme. - Restrict the hostname to the exact authorized flomo webhook hostname or a narrowly defined allowlist.
- Reject embedded credentials, unexpected ports, fragments, and ambiguous hostname encodings.
- Resolve the hostname and reject loopback, private, link-local, multicast, reserved, and unspecified IP addresses where appropriate.
- Disable redirects with
allow_redirects=False, or validate the scheme, hostname, port, and resolved address of every redirect target before following it. - Consider removing
--urlif runtime destination overrides are unnecessary. - Add tests covering HTTP URLs, attacker-controlled hosts, loopback addresses, private addresses, IPv6 variants, and redirect-based bypasses.
