T09 · Insecure Skill Coding Practices
- Location
script/index.js:53- Finding
Unvalidated Remote-Controlled Bridge URL Enables Server-Side Request Forgery
- Content
View full analysis
Vulnerability Details
File Location:
script/index.js, lines 53–55 and 61–69
Vulnerability Type: Server-Side Request Forgery (SSRF) through an unvalidated remote-supplied URL
Risk Level: MediumVulnerable Code
js export const getHymxCacheTokenInfo = async (nodeUrl, pid, key) => { const url = `${nodeUrl}/cache/${pid}/${key}` const result = fetchAOXInfo(url) return result }The remotely supplied value is passed into this function as follows:
js const hymatrixBridgeInfo = await fetchAOXInfo(`${ENDPOINTS.AOX}`) const cachesTokenInfo = await Promise.all( hymatrixBridgeInfo.tokenInfo.map(async (item) => { const tokenInfo = await getHymxCacheTokenInfo( hymatrixBridgeInfo.bridgeNodeUrl, item.wrappedTokenId, 'info' )Technical Analysis
The Skill legitimately requires outbound network access to retrieve current Hymatrix bridge information. However, its initial fixed development endpoint controls
hymatrixBridgeInfo.bridgeNodeUrl, which is then used as the base URL for additionalfetchrequests without validating its protocol, hostname, port, resolved IP address, or redirect behavior.The same remote response also controls
item.wrappedTokenId, which is directly interpolated into the request path. Consequently, compromise of the fixed API or its response path could cause the process to send HTTP requests to attacker-selected destinations, including loopback, link-local, or private-network services accessible from the host.This exceeds the minimum network privileges needed for the declared functionality. The Skill only needs to contact known Hymatrix infrastructure, but the implementation effectively delegates destination selection to an untrusted remote response.
The finding does not establish that credentials, local files, environment variables, or stdin content are currently transmitted. It identifies an exploitable network-request primitive rather than confirmed sensitive-data exfiltr ...[truncated 1616 chars]
- Remediation
View remediation
Remediation Suggestions
-
Allowlist bridge destinations
- Accept only explicitly approved Hymatrix hostnames.
- Require the
https:protocol. - Reject embedded credentials, unexpected ports, and malformed URLs.
-
Block internal destinations
- Resolve the hostname before connecting.
- Reject loopback, private, link-local, multicast, unspecified, and reserved IPv4/IPv6 ranges.
- Account for DNS rebinding by validating the address actually used for each connection.
-
Control redirects
- Disable redirects where possible, or validate the protocol, hostname, port, and resolved address of every redirect target.
-
Validate path components
- Enforce a strict character and length allowlist for
wrappedTokenId. - Encode path segments with
encodeURIComponentrather than directly interpolating remote values.
- Enforce a strict character and length allowlist for
-
Use a fixed trusted base URL
- If dynamic bridge-node discovery is unnecessary, configure the bridge-node origin locally instead of accepting it from an API response.
-
Apply network-level restrictions
- Restrict the Skill's outbound access to approved Hymatrix endpoints through firewall, proxy, or sandbox policy.
- Deny access to cloud metadata and internal management networks.
-
Harden response processing
- Validate remote JSON against a strict schema before using any fields.
- Impose response-size and request-time limits.
- Limit concurrency to reduce the potential for internal scanning or resource exhaustion.
-
