Skip to content

CX Reflected_XSS_All_Clients @ src/main/webapp/vulnerability/SendMessage.jsp [master] #851

@nidhi0512

Description

@nidhi0512

Reflected_XSS_All_Clients issue exists @ src/main/webapp/vulnerability/SendMessage.jsp in branch master

*The application's out.print embeds untrusted data in the generated output with print, at line 11 of src\main\webapp\vulnerability\SendMessage.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 simply providing modified data in the user input ""status"", which is read by the out.print method at line 11 of src\main\webapp\vulnerability\SendMessage.jsp. This input then flows through the code straight to the output web page, without sanitization. 
This can enable a Reflected Cross-Site Scripting (XSS) attack.
Similarity ID: 1182722733

The application's if embeds untrusted data in the generated output with print, at line 18 of src\main\webapp\vulnerability\SendMessage.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 simply providing modified data in the user input ""recipient"", which is read by the if method at line 18 of src\main\webapp\vulnerability\SendMessage.jsp. This input then flows through the code straight to the output web page, without sanitization. 
This can enable a Reflected Cross-Site Scripting (XSS) attack.
Similarity ID: -1408269795*

Severity: High

CWE:79

Vulnerability details and guidance

Checkmarx

Training
Recommended Fix

Lines: 18 11


Code (Line #18):

<tr><td>Recipient: </td><td><input type="text" name="recipient" value="<% if(request.getParameter("recipient")!=null){ out.print(request.getParameter("recipient")); } %>"/></td></tr>

Code (Line #11):

out.print(request.getParameter("status")); //Displaying any error message

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