NormanWenzelWSS / Webgoat-2

Other
0 stars 1 forks source link

Security Dashboard: Cross-site Scripting (CWE 79) - 1 vulnerability detected #2

Open NormanWenzelWSS opened 2 years ago

NormanWenzelWSS commented 2 years ago

WhiteSource SAST Security Report for Cross-site Scripting (CWE 79)

Latest Scan: 2022-03-02 07:30pm New Vulnerabilities: 0 Total Vulnerabilities: 1 Scan URL: WhiteSource SAST

Vulnerability Description

Cross Site Scripting (XSS) vulnerability occurs when an application either does not perform or it performs incorrect neutralization (sanitization) of input data that is included in a web application response. As the result, an attacker is able to inject and execute arbitrary HTML and script code in a user's browser within the context of the vulnerable website. These attacks are often used to steal authentication credentials (e.g. session IDs in cookies). Depending on the vulnerability and the web application, it is also possible to completely alter the web page itself or control the victim's browser

Compliance Standard Violations

Vulnerabilities

File Line Severity Remediation Available
java/org/owasp/webgoat/xxe/Ping.java 55 Medium

Details

java/org/owasp/webgoat/xxe/Ping.java:55 ### Snippet ```Java File logFile = new File(webGoatHomeDirectory, "/XXE/log" + webSession.getUserName() + ".txt"); try { try (PrintWriter pw = new PrintWriter(logFile)) { pw.println(logLine); } ```

Suppress Vulnerability


### Remediation Recommondations

  • Escape HTML before inserting untrusted data into element content
  • Escape attribute before inserting untrusted data into HTML common attributes
  • Escape JavaScript before inserting untrusted data into JavaScript data values
  • Escape CSS and strictly validate before inserting untrusted data into HTML style property values
  • Escape URL before inserting untrusted data into HTML URL parameter values
  • Suppressed Vulnerabilities

    None