wwesleyalves / WebGoat2

Other
0 stars 0 forks source link

CX Reflected_XSS_All_Clients @ webgoat-lessons/crypto/src/main/java/org/owasp/webgoat/crypto/SigningAssignment.java [main] #6

Open wwesleyalves opened 1 year ago

wwesleyalves commented 1 year ago

Reflected_XSS_All_Clients issue exists @ webgoat-lessons/crypto/src/main/java/org/owasp/webgoat/crypto/SigningAssignment.java in branch main

The method getPrivateKey embeds untrusted data in generated output with privateKey, at line 59 of webgoat-lessons\crypto\src\main\java\org\owasp\webgoat\crypto\SigningAssignment.java. 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 request, which is read by the getPrivateKey method at line 50 of webgoat-lessons\crypto\src\main\java\org\owasp\webgoat\crypto\SigningAssignment.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.Similarity ID: 474522588

Severity: High

CWE:79

Vulnerability details and guidance

Checkmarx

Training Recommended Fix

Lines: 50


Code (Line #50):

public String getPrivateKey(HttpServletRequest request) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {

wwesleyalves commented 1 year ago

Issue still exists.

wwesleyalves commented 1 year ago

Issue still exists.

wwesleyalves commented 1 year ago

Issue still exists.

wwesleyalves commented 1 year ago

Issue still exists.