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/forumposts.jsp [master] #21

Open
RobertMickleCx opened this issue Aug 29, 2022 · 0 comments

Comments

@RobertMickleCx
Copy link
Owner

Stored_XSS issue exists @ src/main/webapp/vulnerability/forumposts.jsp in branch master

*The application's out.print embeds untrusted data in the generated output with print, at line 17 of src\main\webapp\vulnerability\forumposts.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 14 of src\main\webapp\vulnerability\forumposts.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.

The application's out.print embeds untrusted data in the generated output with print, at line 18 of src\main\webapp\vulnerability\forumposts.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 14 of src\main\webapp\vulnerability\forumposts.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.

The application's out.print embeds untrusted data in the generated output with print, at line 19 of src\main\webapp\vulnerability\forumposts.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 14 of src\main\webapp\vulnerability\forumposts.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

Checkmarx

Training
Recommended Fix

Lines: 14


Code (Line #14):

rs=stmt.executeQuery("select * from posts where postid="+postid);

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