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

[Bug] XSS Vulnerability in /admin/users #46

Open
4 tasks done
AmrealAbhishek opened this issue Oct 18, 2024 · 1 comment
Open
4 tasks done

[Bug] XSS Vulnerability in /admin/users #46

AmrealAbhishek opened this issue Oct 18, 2024 · 1 comment

Comments

@AmrealAbhishek
Copy link

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There is a Cross-Site Scripting (XSS) vulnerability in the localhost.lugvitc.net/admin/users page. The application is not properly sanitizing user input, which allows attackers to inject arbitrary JavaScript into the page and execute it within the context of other users' browsers.

Expected Behavior

The input fields should properly sanitize all user input, especially special characters such as <, >, " and '. The application should escape any potentially malicious content to prevent script execution.

Steps To Reproduce

Screenshot 2024-10-16 at 4 09 09 PM
Screenshot 2024-10-16 at 4 11 13 PM
Screenshot 2024-10-16 at 4 12 51 PM
Screenshot 2024-10-16 at 4 12 56 PM

  1. Navigate to the localhost.lugvitc.net/admin/users page.
  2. In the input field (e.g., name or other parameters), input the following XSS payload:
  • <input onfocus="alert(document.domain)" autofocus>
  • <img src="x" onerror="console.log('XSS for every user: ', document.cookie)">
    Submit the form and observe that the alert XSS by amreal.in is triggered, indicating that the payload is executed.
    This shows that the application is vulnerable to XSS and does not sanitize the input.
    Screenshot 2024-10-16 at 4 02 48 PM
    Screenshot 2024-10-16 at 4 07 38 PM

Environment

- OS: ubuntu
- Headscale version:  Headscale-Admin v0.1.12b
- Tailscale version:

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

@GoodiesHQ
Copy link
Owner

Very neat! I love this! It's much appreciated and I will address this on the next push.

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

2 participants