T09 · Insecure Skill Coding Practices
- Location
monitor.sh:25- Finding
Arbitrary-Target Server-Side Request Forgery in Endpoint Monitoring
- Content
View full analysis
" exit 1 fi echo "Adding $URL..." cat endpoints.json | jq ". += [\"$URL\"]" > tmp.json && mv tmp.json endpoints.json echo "✅ Added $URL" ;; ``` ### Technical Analysis The monitor treats every configured endpoint as trusted and issues an outbound request with Node.js `fetch()`. It does not restrict URL schemes, permitted hostnames, ports, resolved IP addresses, or redirects. Consequently, a user capable of adding an endpoint can direct the monitor toward loopback interfaces, private network ranges, link-local addresses, cloud metadata services, or other destinations reachable from the host. Redirects can also potentially bypass validation unless every redirect destination is independently checked. The generated dashboard does not expose response bodies, limiting direct data extraction. Nevertheless, response status, timing, success state, and error messages are recorded, enabling internal-network probing and blind interaction with HTTP services. GET endpoints that perform state changes could also be triggered. The script does not automatically execute `server.js`; exploitation requires the generated server to be started separately. ### Attack Path 1. Run `./monitor.sh start` to generate ...[truncated 1322 chars]- Remediation
View remediation
