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.

From Apache Server 2.4 UNIX Server Security Technical Implementation Guide

Part of SRG-APP-000223-WSR-000011

Associated with: CCI-001664

AS24-U1-000470_rule 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.

Vulnerability discussion

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.

Check content

Review the web server documentation and configuration to determine if cookies between the web server and client are accessible by applications or web servers other than the originating pair. grep SessionCookieName <'INSTALL LOCATION'>/mod_session.conf Confirm that the "HttpOnly" and "Secure" settings are present in the line returned. Confirm that the line does not contain the "Domain" cookie setting. Verify the "mod_header" module is loaded in the web server: # httpd -M |grep header Verify "mod_header" is returned from the above command. If the cookie settings do not align with these requirements, this is a finding.

Fix text

Edit the "mod_session.conf" file and find the "SessionCookieName" directive. Set the "SessionCookieName" to "session path=/; HttpOnly; Secure; " Example: SessionCookieName session path=/; HttpOnly; Secure; Restart Apache: apachectl restart

Pro Tips

Lavender hyperlinks in small type off to the right (of CSS class id, if you view the page source) point to globally unique URIs for each document and item. Copy the link location and paste anywhere you need to talk unambiguously about these things.

You can obtain data about documents and items in other formats. Simply provide an HTTP header Accept: text/turtle or Accept: application/rdf+xml.

Powered by sagemincer