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

CX Stored_XSS @ src/main/java/org/cysecurity/cspf/jvl/controller/LoginValidator.java [refs/heads/master] #174

Open
juegge opened this issue Oct 13, 2021 · 6 comments

Comments

@juegge
Copy link

juegge commented Oct 13, 2021

Stored_XSS issue exists @ src/main/java/org/cysecurity/cspf/jvl/controller/LoginValidator.java in branch refs/heads/master

The application's if embeds untrusted data in the generated output with print, at line 87 of src\main\webapp\header.jsp. This untrusted data is embedded straight into the output without proper sanitization or encoding, enabling an attacker to inject malicious code into the output.
The attacker would be able to alter the returned web page by saving malicious data in a data-store ahead of time. The attacker's modified data is then read from the database by the processRequest method with rs, at line 52 of src\main\java\org\cysecurity\cspf\jvl\controller\LoginValidator.java. This untrusted data then flows through the code straight to the output web page, without sanitization. 
This can enable a Stored Cross-Site Scripting (XSS) attack.

Severity: High

CWE:79

Vulnerability details and guidance

Checkmarx

Training
Recommended Fix

Lines: 52


Code (Line #52):

                                   rs=stmt.executeQuery("select * from users where username='"+user+"' and password='"+pass+"'");

@juegge juegge closed this as completed Oct 13, 2021
@juegge juegge reopened this Oct 13, 2021
@juegge
Copy link
Author

juegge commented Oct 13, 2021

Issue still exists.

1 similar comment
@juegge
Copy link
Author

juegge commented Oct 13, 2021

Issue still exists.

@juegge juegge closed this as completed Oct 13, 2021
@juegge juegge reopened this Feb 16, 2022
@juegge
Copy link
Author

juegge commented Feb 16, 2022

Issue still exists.

@juegge juegge closed this as completed Feb 16, 2022
@github-actions github-actions bot reopened this Feb 17, 2022
@github-actions
Copy link

Issue still exists.

@github-actions
Copy link

Issue still exists.

@github-actions github-actions bot reopened this Mar 14, 2022
@github-actions
Copy link

Issue still exists.

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

1 participant