T09 · Insecure Skill Coding Practices
- Location
scripts/utils/validator.js:3- Finding
Arbitrary URL Fetching Enables Server-Side Request Forgery
- Content
View full analysis
{ if (this.__isRequireRedirect(response)) { redirectCount++; if (redirectCount > this.__opts.maxRedirects) { const err = new Error("Too many redirects"); this.__setState(this.__states.FAILED); this.emit("error", err); return reject(err); } const redirectedURL = /^https?:\/\//.test(response.headers.location) ? response.headers.location : new URL(response.headers.location, url).href; this.emit("redirected", redirectedURL, url); return getRequest(redirectedURL, getReqOptions(redirectedURL)); } ``` ### Technical Analysis The URL validator verifies only that the input uses the HTTP or HTTPS scheme. It does not resolve and inspect the destination address or reject loopback, private, link-local, reserved, or cloud metadata address rang ...[truncated 1957 chars]- Remediation
View remediation
