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

Reflected_XSS_All_Clients @ /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java #11

Open
oscardatastream opened this issue Mar 14, 2023 · 0 comments

Comments

@oscardatastream
Copy link
Owner

oscardatastream commented Mar 14, 2023

Checkmarx (SAST): Reflected_XSS_All_Clients
Security Issue: Read More about Reflected_XSS_All_Clients
Checkmarx Project: oscardatastream/slackDatastream
Repository URL: https://github.com/oscardatastream/slackDatastream
Branch: master
Scan ID: c523472e-01c3-4305-b7dd-e80238456bde


The method cadenas embeds untrusted data in generated output with cadena, at line 43 of /02_02_WS_Cliente/src/main/webapp/cadenas.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 simply providing modified data in the user input ""cadena"", which is read by the doGet method at line 47 of /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java. 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.

Result #1:
Severity: HIGH
State: TO_VERIFY
Status: RECURRENT
Attack Vector:

    1. ""cadena"": /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java[47,40]
    2. getParameter: /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java[47,39]
    3. cadena: /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java[47,10]
    4. cadena: /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java[81,34]
    5. getAttribute: /02_02_WS_Cliente/src/main/webapp/cadenas.jsp[30,48]
    6. cadena: /02_02_WS_Cliente/src/main/webapp/cadenas.jsp[30,10]
    7. cadena: /02_02_WS_Cliente/src/main/webapp/cadenas.jsp[43,-2]
    Review result in Checkmarx One: Reflected_XSS_All_Clients

@oscardatastream oscardatastream changed the title Reflected_XSS_All_Clients @ CadenasS.java Reflected_XSS_All_Clients @ /02_02_WS_Cliente/src/main/java/com/curso/java/servlets/CadenasS.java Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant