STIGUI
V-256781CAT II — Medium severitySV-256781r960735_rule

vSphere UI must protect cookies from cross-site scripting (XSS).

Rule version VCUI-70-000004 · STIG v1 · 2026-09-09

Discussion

Cookies are a common way to save session state over the HTTP(S) protocol. If an attacker can compromise session data stored in a cookie, they are better able to launch an attack against the server and its applications. When a cookie is tagged with the "HttpOnly" flag, it tells the browser this particular cookie should only be accessed by the originating server. Any attempt to access the cookie from client script is strictly forbidden.

Satisfies: SRG-APP-000001-WSR-000002, SRG-APP-000439-WSR-000154

Check

At the command prompt, run the following command:

# xmllint --format /usr/lib/vmware-vsphere-ui/server/conf/context.xml | xmllint --xpath '/Context/@useHttpOnly' - 

Expected result:

useHttpOnly="true"

If the output does not match the expected result, this is a finding.

Fix

Navigate to and open:

/usr/lib/vmware-vsphere-ui/server/conf/context.xml

Add the following configuration to the <Context> node:

useHttpOnly="true"

Example:

<Context useHttpOnly="true" sessionCookieName="VSPHERE-UI-JSESSIONID" sessionCookiePath="/ui">

Restart the service with the following command:

# vmon-cli --restart vsphere-ui

Identifiers

Group ID
V-256781
Group title
SRG-APP-000001-WSR-000002
Rule ID
SV-256781r960735_rule
Check ID
C-60456r889340_chk
Fix ID
F-60399r889341_fix