UCF STIG Viewer Logo

Cookies exchanged between the Apache web server and client, such as session cookies, must have security settings that disallow cookie access outside the originating Apache web server and hosted application.


Finding ID Version Rule ID IA Controls Severity
V-92407 AS24-W1-000470 SV-102495r1_rule Medium
Cookies are used to exchange data between the web server and the client. Cookies, such as a session cookie, may contain session information and user credentials used to maintain a persistent connection between the user and the hosted application since HTTP/HTTPS is a stateless protocol. When the cookie parameters are not set properly (i.e., domain and path parameters), cookies can be shared within hosted applications residing on the same web server or to applications hosted on different web servers residing on the same domain.
Apache Server 2.4 Windows Server Security Technical Implementation Guide 2019-09-30


Check Text ( C-91703r1_chk )
Review the <'INSTALL PATH'>\conf\httpd.conf file.

If "HttpOnly;secure" is not configured, this is a finding.

Review the code. If when creating cookies, the following is not occurring, this is a finding:

function setCookie() { document.cookie = "ALEPH_SESSION_ID = $SESS; path = /; secure"; }
Fix Text (F-98645r1_fix)
Add this line to "httpd.conf" file:

Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;secure

Add the secure attribute to the JavaScript set cookie:

function setCookie() { document.cookie = "ALEPH_SESSION_ID = $SESS; path = /; secure"; }

HttpOnly cannot be used since by definition this is a cookie set by JavaScript.

Restart the Apache service.