4.1.2.6 Ensure 'httpOnlyCookies' HttpOnly attribute is set to 'True' for the authentication cookies

Information

The HttpOnly attribute on a cookie prevents the cookie from being accessed by the client side scripts.

Preventing client-side scripts from accessing authentication cookies helps prevent Cross-Site Scripting (XSS) attacks.

Solution

Set the httpOnlyCookies attribute to true in the webAppSecurity in the ${server.config.dir}/configDropins/overrides/*.xml

<webAppSecurity httpOnlyCookies="true" />

See Also

https://workbench.cisecurity.org/benchmarks/7724

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-13

Plugin: Unix

Control ID: e991f4e1c04ad6efc17a7b9c40f0aa0db3ce3584fe78d03364dd2d747b8d9964