Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unvalidated Redirect #288

Open
bright-security bot opened this issue Jul 13, 2023 · 0 comments
Open

Unvalidated Redirect #288

bright-security bot opened this issue Jul 13, 2023 · 0 comments

Comments

@bright-security
Copy link

Unvalidated Redirect

Severity: Medium Discovered: 13 of July-2023, 01:08 PM

CWE ID

CWE-601

CVSS

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Details

An http parameter may contain a URL value and could cause the web application to redirect the request to the specified URL. By modifying the URL value to a malicious site, an attacker may successfully launch a phishing scam and steal user credentials. Because the server name in the modified link is identical to the original site, phishing attempts have a more trustworthy appearance.

Possible exposure

Bypass Protection Mechanism; Gain Privileges or Assume Identity; Other

Remediation suggestions

Assume all input is malicious. Use an 'accept known good' input validation strategy, i.e., use a whitelist of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, 'boat' may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as 'red' or 'blue.' Do not rely exclusively on looking for malicious or malformed inputs (i.e., do not rely on a blacklist). A blacklist is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, blacklists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. Use a whitelist of approved URLs or domains to be used for redirection.

Request

GET https://brokencrystals.com/api/file?path=brokencrystals.com%3Fdummy%3D&type=image%2Fjpg HTTP/1.1
Referer: https://brokencrystals.com/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/106.0.5249.119 Safari/537.36
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: identity
cookie: bc-calls-counter=1689253590986; connect.sid=BZ9PWDty0nY2uwuKqkbwIaK-g6tDo2h3.eE%2B38Ej4PpuJBooKeub4OqjP7QHqy%2FnoTZ%2B1%2F%2BpHqY0
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
Content-Length: 0

Response

HTTP/1.1 500
access-control-allow-origin: *
content-length: 52
content-type: application/json; charset=utf-8
date: Thu, 13 Jul 2023 13:07:56 GMT
strict-transport-security: max-age=15724800; includeSubDomains
vary: Origin
set-cookie: connect.sid=sdEwzpVNdGYIlkROUPw-4bOtAVDOpZmo.D%2By1isG1ZnB8k1R4CS7orBqsoYyvGshLBlwDUun5GJo; Path=/

{"statusCode":500,"message":"Internal server error"}

Screenshots

Screenshot (0)

External links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants