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

Potential Security Issue: DOM-Based XSS via jumpPath Redirection #83

Open
shwet04 opened this issue Mar 28, 2025 · 1 comment
Open

Potential Security Issue: DOM-Based XSS via jumpPath Redirection #83

shwet04 opened this issue Mar 28, 2025 · 1 comment

Comments

@shwet04
Copy link

shwet04 commented Mar 28, 2025

While reviewing the code, I noticed a potential DOM-Based Cross-Site Scripting (DOM-XSS) vulnerability related to how redirection is handled via jumpPath in the client-side JavaScript.

This issue could allow an attacker to execute malicious JavaScript in a user's browser, leading to session hijacking, phishing attacks, or unauthorized actions.

Image

Steps to Reproduce (Proof of Concept)

  1. If an attacker can control the server response and set: jumpPath: javascript:alert('Hacked');

  2. The following vulnerable code will execute: window.location.href = getBasePath() + xmlhttp.getResponseHeader("jumpPath");

  3. This results in:
    window.location.href = "javascript:alert('Hacked');";

  4. The browser executes the JavaScript, leading to arbitrary code execution.

## Impact

High Severity: Allows attackers to execute malicious JavaScript in users’ browsers.

Potential Risks: Account compromise, phishing, session hijacking.

Fix Priority: High 🚀

I truly appreciate the hard work of the maintainers and wanted to bring this to your attention for the security of the project and its users.

@diyhi
Copy link
Owner

diyhi commented Mar 30, 2025

你有测试的示例吗?

实测并不会产生window.location.href = "javascript:alert('Hacked');";这种结果。

window.location.href = getBasePath() + xmlhttp.getResponseHeader("jumpPath");

这段代码生成的路径是http://127.0.0.1:8080/javascript:alert('Hacked');这种,

这种链接根本就产生不了XSS漏洞

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