Skip to content

Conversation

@MattSilverio
Copy link
Contributor

Resolving problem to issue #1553

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The security issue highlighted concerns untrusted URL redirection from a remote source, where user input is incorporated into a URL redirect without full validation, leading to potential phishing attacks (CWE-601). The proposed change ensures that the scheme is HTTPS and the netloc is in the allowed hosts. However, this may not fully mitigate the risk as it does not address the validation of the entire URL, such as the path and query parameters which can also be exploited.

To address the issue more comprehensively, consider implementing the following:

  1. Validate the full URL structure, not just the scheme and netloc.
  2. Ensure that the path and query parameters do not redirect to an untrusted page even if the netloc is within the allowed hosts.
  3. Use a list of allowed paths or a regular expression to validate the entire redirection endpoint.
  4. Employ a safe redirect function that only redirects to known-safe URLs defined within the application.

Implementing these additional checks will help to ensure that the application is not vulnerable to open redirection attacks stemming from user input.

@JisanAR03
Copy link
Contributor

@MattSilverio the github , google and facebook callback function have to be updated. What you have to do is : read those social media documents and implement it on the BLT, which I'm going gonna do after few days, or if you can do that, implement this one, but don't do something like sanitization system cause this is mainly feature problem, not a security one. best of luck ☺

@github-advanced-security
Copy link
Contributor

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

MattSilverio

This comment was marked as duplicate.

Copy link
Contributor Author

@MattSilverio MattSilverio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional checks implemented as requested, @DonnieBLT

MattSilverio

This comment was marked as resolved.

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just let me know about the file

@DonnieBLT DonnieBLT enabled auto-merge (rebase) December 19, 2023 02:38
@DonnieBLT DonnieBLT merged commit c1bdaaa into OWASP-BLT:main Dec 19, 2023
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

Successfully merging this pull request may close these issues.

4 participants