Varonis Finds ServiceNow Roles Can Enable Administrator Session Hijacking

Summary
Varonis Threat Labs reports that ServiceNow’s template_editor with ITIL and sn_nowassist_admin roles can be used to capture another user’s session through scripts in templates or Now Assist actions. ServiceNow fixed the demonstrated sandbox escape, but the article says’
Key points
- Varonis Threat Labs reports that users with template_editor and ITIL can add JavaScript to a shared incident template; when another user applies it, the script runs in that user’s session context.
- The researchers describe using a JavaScript constructor-chain sandbox escape to reach GlideTransaction and read the victim’s cookie and X-UserToken from request headers.
- The article describes a second path using the sn_nowassist_admin role to create a Now Assist quick action and an incident-form button that captures session material when clicked.
- The researchers say captured cookies and tokens can be replayed as the victim, potentially including an administrator; this is a reported research finding, not evidence of a real-world compromise.
- ServiceNow fixed the demonstrated constructor.constructor sandbox-escape technique. The article also says template scripts are evaluated with sandbox enforcement on patched instances, while describing the broader risk of executable template and quick-action code.
- Recommended measures include restricting who can edit shared templates and quick actions, reviewing their scripts as privileged code, alerting on scripts that access authentication headers, and monitoring session activity.
Article Details
- Attack Vectors
- A user with the template_editor and ITIL roles can modify a shared incident template to execute JavaScript when another user applies it, causing code to read that user's session cookie and security token.
- A user with the sn_nowassist_admin role can create a server-side quick action and an incident-form button that silently captures the clicking user's session cookie and token.
- The attacker can retrieve captured session material from an incident field or writable quick-action record and replay it to act as the victim.
- The article describes adding a business rule after obtaining an administrator session to harvest session material again on future logins.
- Defensive Notes
- Treat executable template fields and quick-action scripts as privileged code and subject them to code review.
- Restrict and review assignments of template_editor, ITIL, and sn_nowassist_admin, including who can edit shared templates and quick actions.
- Alert on scripts that read x-usertoken, cookie, or Authorization headers outside an approved allowlist.
- Restrict and log background-script console access, and alert on script executions.
- Monitor for runtime redefinition of JavaScript built-in prototype methods and for session anomalies such as unexpected IP addresses or device changes.
- Limit administrator and other highly privileged access to trusted subnets using ServiceNow IP Access Controls.
MITRE ATT&CK
T1059.007 · JavaScriptThe template and Now Assist quick-action payloads execute JavaScript in ServiceNow to read session data.T1204 · User ExecutionSession capture is triggered when a victim applies a modified incident template or clicks the malicious quick-action button.T1539 · Steal Web Session CookieThe payload reads the victim's live session cookie from the request headers.T1550.004 · Web Session CookieThe article describes replaying a captured cookie and X-UserToken to make requests as the victim.
Vendors
ServiceNowThe next ServiceNow session an admin loses might not be a stolen password or a zero-day. It could simply be due to a shared incident template or an "AI Summary" button they clicked without a second thought.VaronisVaronis Threat Labs discovered that two ServiceNow roles — one held by ordinary help-desk agents, the other by anyone managing ServiceNow's generative AI feature Now Assist — are enough to silently capture the live
Products
Now Assistone held by ordinary help-desk agents, the other by anyone managing ServiceNow's generative AI feature Now Assist — are enough to silently capture the live session of any other user on the instance, up to andServiceNowThe next ServiceNow session an admin loses might not be a stolen password or a zero-day. It could simply be due to a shared incident template or an "AI Summary" button they clicked without a second thought.Varonis Data Security Platformrequires looking beyond the initial token theft to the underlying data and user activity. The Varonis Data Security Platform monitors your ServiceNow instance, the critical data within it, and exactly who is accessing
