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/webapp/vulnerability/DisplayMessage.jsp [refs/heads/master] #175

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/webapp/vulnerability/DisplayMessage.jsp in branch refs/heads/master

The application's out.print embeds untrusted data in the generated output with print, at line 19 of src\main\webapp\vulnerability\DisplayMessage.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 rs=stmt.executeQuery method with rs, at line 16 of src\main\webapp\vulnerability\DisplayMessage.jsp. 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: 16


Code (Line #16):

             rs=stmt.executeQuery("select * from UserMessages where msgid="+request.getParameter("msgid"));

@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 github-actions bot reopened this Mar 14, 2022
@github-actions
Copy link

Issue still exists.

1 similar comment
@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