AS24-W1-000470 - 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 - Javascript setCookie


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.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.


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.

See Also

Item Details


References: 800-53|SC-23(3), CAT|II, CCI|CCI-001664, Rule-ID|SV-214332r879638_rule, STIG-ID|AS24-W1-000470, STIG-Legacy|SV-102495, STIG-Legacy|V-92407, Vuln-ID|V-214332

Plugin: Windows

Control ID: a9d3626d8a6bc3f0d56641f9d7a6ea91a17f67d67e1ea1a49cdab3d50c9ef0d1