T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/utils/validator.js:3- Finding
Arbitrary URL Fetching Enables SSRF and External Disclosure of Internal Responses
- Content
View full analysis
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, this.url).href; this.__isRedirected = true; this.__initProtocol(redirectedURL); this.emit("redirected", redirectedURL, this.url); return this.__start(); } ``` ```js // scripts/video2text/index.js:140-154 const presignedUrl = await video.getPresignedUrl(tokenValue, file); if (!presignedUrl || !presignedUrl?.url || presignedUrl.url === "") { throw new Error("Failed to obtain presigned URL; report this to the developer"); } utils.printInfo("Uploading file to secure storage..."); await upload.uploadFileToOSS(file, presignedUrl.url, presignedUrl. ...[truncated 2610 chars]- Remediation
View remediation
