← Lab /Security & privacy

Unauthenticated RCE in ServiceNow via sandbox escape

An unauthenticated attacker can achieve remote code execution on any ServiceNow instance by escaping the pre-authentication script sandbox.

Security & privacy Assetnote / Searchlight 14 Jul 2026 Disclosure Real-world evidence

Published as “Smashing the ServiceNow Sandbox – Pre Authentication RCE”

Why it matters

Organizations using ServiceNow must apply the vendor patches or risk unauthenticated remote code execution and full instance compromise.

Summary

The researchers discovered that ServiceNow’s GlideRecord API evaluates JavaScript strings passed as query values, allowing script injection even in pre-authentication contexts. By abusing the gs.include mechanism and overriding Object.clone with the Function constructor, they escaped the strict sandbox and executed arbitrary code. They demonstrated full instance compromise, data extraction, admin user creation, and command execution on connected proxy servers. ServiceNow patched the issue (CVE-2026-6875) and introduced a Guarded Script sandbox to mitigate future escapes.

What they found 2

  1. The exploit grants full data access and admin creation capabilities.

    “The impact is much the same as our previous bug. With our access to the Rhino engine we can pull any data from any tables we like and create admin users at will.”

  2. The vulnerability was assigned CVE-2026-6875.

    “The issue was assigned CVE-2026-6875.”

Caveats 4

  • eval and new Function(...)() are forbidden, as well as the use of functions function x(){...}
  • Object.clone is frozen:
  • Object.clone = 123; // Cannot modify a property of a sealed object: clone
  • The introduction of Guarded Script makes future sandbox escapes much less likely, by severly limiting the syntax that a pre auth attacker can use.

What’s new here 4

  • Discovered unauthenticated remote code execution via GlideRecord JavaScript injection.
  • Identified a sandbox bypass using gs.include and overridden Object.clone to run unsandboxed code.
  • Showed ability to read any table, create admin users, and execute shell commands on proxy servers.
  • Vendor released patches and introduced Guarded Script to restrict sandboxed expressions.

In the news