4.1.1.2 Ensure 'cookieHttpOnly' HttpOnly attribute is set to 'true' for session cookies

Information

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

Enabling HttpOnly attribute mitigates Cross-Site Scripting (XSS) attacks.

Solution

Set the cookieHttpOnly attribute to true in the httpSession element in the ${server.config.dir}/configDropins/overrides/<any file name>.xml

<httpSession cookieHttpOnly="true" />

See Also

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

Item Details

Category: ACCESS CONTROL, IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-17(2), 800-53|IA-5, 800-53|IA-5(1), 800-53|SC-8, 800-53|SC-8(1), CSCv7|14.4

Plugin: Unix

Control ID: a88642bbad65c9164236ac7a7ad2cfa28a282b5f811b3223110113c705788093