This site does not specify the HTTPOnly flag for session cookies.
In most browsers, the HTTPOnly flag prevents a user's cookie from being accessed by various client side scripts, including malicious scripts inserted by Cross-Site Scripting (XSS) attacks. Setting this cookie attribute does not eliminate XSS vulnerabilities, but does reduce the likelihood that an XSS vulnerability can be used to extract valuable application based session and/or authentication cookies from the victim's browser.
Recommendation
This site does not specify the HTTPOnly flag for its session cookie. In most browsers, the HTTPOnly flag prevents a user's cookie from being accessed by various client side scripts, including malicious scripts inserted by a Cross-Site Scripting (XSS) attack. Setting this cookie attribute does not eliminate XSS vulnerabilities, but does reduce the likelihood that an XSS vulnerability can be used to extract valuable application based session and/or authentication cookies from the victim's browser.
Vulnerability ID: WS15-T4E5-UQRB-IGHJ
Application Name: WebGoat
Vulnerability Link: http://localhost:19080/Contrast/static/ng/index.html#/7c6cfec5-a187-4d5e-984a-d11d96d2ef63/applications/1f21baa2-741d-47df-a8ea-89ea70b18615/vulns/WS15-T4E5-UQRB-IGHJ
What Happened?
The HttpCookie created in following call from in Response.java did not contain the HttpOnly flag:
response.addHeader("Set-Cookie","JSESSIONID=B73327F913BCE80911DBC6731850CABE; Pa...")
What's the risk?
This site does not specify the HTTPOnly flag for session cookies.
In most browsers, the HTTPOnly flag prevents a user's cookie from being accessed by various client side scripts, including malicious scripts inserted by Cross-Site Scripting (XSS) attacks. Setting this cookie attribute does not eliminate XSS vulnerabilities, but does reduce the likelihood that an XSS vulnerability can be used to extract valuable application based session and/or authentication cookies from the victim's browser.
Recommendation
This site does not specify the HTTPOnly flag for its session cookie. In most browsers, the HTTPOnly flag prevents a user's cookie from being accessed by various client side scripts, including malicious scripts inserted by a Cross-Site Scripting (XSS) attack. Setting this cookie attribute does not eliminate XSS vulnerabilities, but does reduce the likelihood that an XSS vulnerability can be used to extract valuable application based session and/or authentication cookies from the victim's browser.
First Event
Last Event
HTTP Request
GET http://localhost:8080/WebGoat/ HTTP/1.0 Accept-Language: en-US,en;q=0.5 Cookie: AJS.conglomerate.cookie="|config.sidebar.planNavigator.expanded=true|tabContainer.tabContainer.selectedTab=Capabilities|tabContainer.remote-agents-tabs.selectedTab=Online remote agents"; language=en Host: localhost:8080 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:73.0) Gecko/20100101 Firefox/73.0 Upgrade-Insecure-Requests: 1 Connection: keep-alive Accept-Encoding: gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
References
https://www.owasp.org/index.php/Top_10_2013-A2-Broken_Authentication_and_Session_Management