Skip to content

CX Stored_XSS @ src/main/webapp/vulnerability/UserDetails.jsp [master] #31

@cx-mallory-woods

Description

@cx-mallory-woods

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

The method out.print embeds untrusted data in generated output with print, at line 16 of src\main\webapp\vulnerability\UserDetails.jsp. This untrusted data is embedded into the output without proper sanitization or encoding, enabling an attacker to inject malicious code into the generated web-page.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 stmt.executeQuery method with rs, at line 13 of src\main\webapp\vulnerability\UserDetails.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.Similarity ID: 1508527562

Similarity Id: 1508527562

Severity: CRITICAL

CWE:79

Checkmarx

Recommended Fix

Lines: 13


Code (Line #13):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions