TCAT-AS-000080 - Cookies must have http-only flag set.

Information

It is possible to steal or manipulate web application session and cookies without having a secure cookie. Configuring the secure flag injects the setting into the response header.

The $CATALINA_BASE/conf/web.xml file controls how all applications handle cookies via the <cookie-config> element.

Solution

From the Tomcat server console as a privileged user:

edit the $CATALINA_BASE/conf/web.xml

If the cookie-config section does not exist it must be added. Add or modify the <http-only> setting and set to true.

EXAMPLE:
<session-config>
<session-timeout>15</session-timeout>
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
</session-config>

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Apache_Tomcat_Application_Server_9_V2R4_STIG.zip

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3, CAT|II, CCI|CCI-000213, Rule-ID|SV-222933r615938_rule, STIG-ID|TCAT-AS-000080, STIG-Legacy|SV-111397, STIG-Legacy|V-102449, Vuln-ID|V-222933

Plugin: Unix

Control ID: 300bb382d07c5f876c71996dc809f5ecbad739d52244da14b8dc1afa2e0e64f8