llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · servo

GHSA-G642-F7QJ-WGXP

Privileged navigator.servo (ServoInternals) prefs API exposed to web content in about:srcdoc iframes

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión0.5.0
Exposición15 dDesde la divulgación, 4 nov 2026, 10:49 a. m.
Detección15 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
4 nov 26
20 nov 26
4 nov 26
8 nov 26
12 nov 26
16 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-G642-F7QJ-WGXP divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

We would like to report a privilege-boundary violation in Servo. The internal
ServoInternals interface, reachable from script as navigator.servo, is meant to be
available only to trusted about: chrome pages (for example about:config). The gate that
decides this trust looks at the document's serialized URL rather than its origin/principal,
and it treats every about: URL except about:blank as privileged. A document created from an
<iframe srcdoc> attribute is assigned the URL about:srcdoc while its content is fully
attacker-authored, so any web page the victim loads can embed such an iframe and obtain
navigator.servo. From there, untrusted web content can read every preference and write the
script process's feature-flag preferences, by default, with no user interaction.

This issue was found by Anthropic using Claude, and has been reviewed manually by me from Ada Logics.

Let me know if you need any more information.

It was reproduced end to end against a servoshell built from current main HEAD
4e2ad49caae5de92c0125d7b3654bb70579e971e (2026-08-08), built with ./mach build --release and
run headless with software GL (Mesa llvmpipe under xvfb). No Servo source is modified; this is
default browsing-context behaviour with default preferences.

Location: components/script/dom/servointernals.rs — ServoInternals::is_servo_internal (the
faulty disjunct `url.scheme() == "about" && url.as_str() != "about:blank");` the sinks
`SetBoolPreference/SetIntPreference/SetStringPreference (-> prefs::set)` and the matching
`Get*Preference`. The srcdoc document is assigned `about:srcdoc` in
`components/script/script_thread.rs` (`page_load_about_srcdoc`, `ServoUrl::parse("about:srcdoc")`).
The WebIDL binding `components/script_bindings/webidls/ServoInternals.webidl` attaches
`Func="ServoInternals::is_servo_internal"` to both the navigator.servo attribute and each
`Get*/Set*Preference` method, so that predicate is exactly what decides visibility of the
interface in a realm.

The gate authorizes on the serialized URL string instead of the document's origin/principal:

    fn is_servo_internal(cx: &mut js::context::JSContext, _global: HandleObject) -> bool {
        let realm = CurrentRealm::assert(cx);
        let global_scope = GlobalScope::from_current_realm(&realm);
        let url = global_scope.get_url();
        (url.scheme() == "about" && url.as_str() != "about:blank") ||   // faulty check
            ScriptThread::is_servo_privileged(url) ||
            prefs::get().expose_servointernals_globally
    }

The set of about: URLs is not a trust boundary. about:srcdoc is assigned to a document whose
content is fully attacker-controlled — the srcdoc attribute of an iframe written by a web page
— yet it has scheme "about" and is not "about:blank", so the first disjunct returns true. The
other two disjuncts are inert in the shipped default configuration: is_servo_privileged tests
a privileged_urls set that is empty unless an embedder registers custom protocol handlers, and
expose_servointernals_globally defaults to false. So by default the gate reduces to the URL
test, which about:srcdoc passes.

How attacker web content reaches it, all in default config:

  1. The attacker page contains
  2. Servo loads the srcdoc document and assigns it the URL about:srcdoc.
  3. Script in the frame accesses navigator.servo. The binding consults is_servo_internal;
  4. setBoolPreference(name, value) reaches prefs::set(), overwriting the script process's

Observed output (real shipped servoshell driving real web content; the srcdoc document reports
back to the attacker origin, complete copy in the attached reproducer_output.txt):

[*] launching servoshell headless against http://nav.example.com:8010/ ...
REPORT {"url":"about:srcdoc","typeofServo":"object","exposed":true,
"pref":"dom_webgl2_enabled","before":false,"after":true,"write_ok":true}
RESULT=PASS: navigator.servo exposed to about:srcdoc web content AND a real preference
was written.

The decisive line is the REPORT: url == about:srcdoc (a document created by attacker-authored
srcdoc content), typeof navigator.servo == "object" (the privileged internal API is reachable),
and getBoolPreference('dom_webgl2_enabled') == false then setBoolPreference(..., true) then
getBoolPreference(...) == true (a genuine process-preference read+write from web content). On a
fixed engine navigator.servo is undefined in about:srcdoc and this is impossible.

What access to navigator.servo grants
-------------------------------------
navigator.servo is the ServoInternals interface. Its WebIDL states the boundary plainly:
"Private interfaces that are only used for internal Servo usage like about: pages. This
interface is entirely internal to Servo, and should not be accessible to web pages." Once
exposed, web content can call all of it:

preferenceList() enumerate every preference name
getPreference / get{String,Int,Bool}Preference / defaultPreferenceValue / preferenceType
read the value, default and type of any pref
set{String,Int,Bool}Preference write any preference (script-process copy)
garbageCollectAllContexts() force GC across all contexts
reportMemory() produce a memory report

Concrete gains for an attacker who reaches it from an about:srcdoc frame:

  1. Configuration disclosure. `preferenceList()` + `getPreference()` read the deployment's entire
  1. Enabling disabled-by-default attack surface, including a path to memory corruption.
  1. `garbageCollectAllContexts()` lets web content force garbage collection across all contexts

Scope bound (stated plainly): the write primitive mutates only the script process's in-memory
PREFERENCES copy, so preferences consumed in other processes are readable but not effectively
writable through this call. The write is process-global within the script process that hosts
the attacker's same-site documents.

On whether you consider this a security issue
---------------------------------------------
We recognise that ServoInternals is developer/debug tooling, and that you may not treat
navigator.servo as a hardened trust boundary — the `expose_servointernals_globally` preference,
added for testing, suggests it is sometimes regarded as low-sensitivity. We are reporting it
because the code itself draws the boundary: the WebIDL says the interface "should not be
accessible to web pages", and is_servo_internal exists precisely to keep it off web content,
explicitly excluding about:blank as a web-reachable about: URL. about:srcdoc is another
web-reachable about: URL that reaches it, and it was, as far as we can tell, never considered
in relation to this gate. We have laid out the trust boundary and the concrete gains above so
you can judge the impact. In our own reading this is High, given the default-config,
unauthenticated, zero-interaction reach from any web page plus the escalation to memory
corruption via WebGL2; but we defer to your assessment of severity and whether it warrants a
fix and at what priority.

Reachability: the only precondition for reaching navigator.servo is that the victim loads an
attacker-controlled web page; that page embeds an <iframe srcdoc="..."> and the script inside
the frame obtains navigator.servo. Default build, default preferences, zero interaction,
whole-web origin space.

We checked the servo/servo published Security Advisories and the GitHub Advisory DB / NVD for
servointernals, is_servo_internal, about:srcdoc, and navigator.servo, and did not find this
reported. It appears novel.

Reproduction
------------
Attached is a self-contained Docker reproducer (ANT-2026-8R6T3AMV-e2e.zip).

ANT-2026-8R6T3AMV-e2e.zip https://github.com/user-attachments/files/30860822/ANT-2026-8R6T3AMV-e2e.zip

unzip ANT-2026-8R6T3AMV-e2e.zip
cd ANT-2026-8R6T3AMV
docker build -t servo-e2e-base:latest docker-e2e/servo-base/
docker build -t ant-8r6t3amv docker-e2e/ && docker run --rm ant-8r6t3amv

The base image clones Servo at the pinned commit and builds the real servoshell
(./mach build --release; multi-GB download and a long native compile, roughly 30-45 minutes).
run_e2e.sh then starts a local HTTP server that serves an attacker page containing an
<iframe srcdoc> whose script probes navigator.servo, reads a real preference, writes it, reads
it back, and reports the outcome to the attacker origin. It launches the real shipped
servoshell headless against that page. The run ends in "RESULT=PASS". The full report and
captured output (reproducer_output.txt) are included.

Disclosure
----------
We follow coordinated disclosure policy here:
https://www.anthropic.com/coordinated-vulnerability-disclosure (90 day deadline).

Please credit Claude and Ada Logics -- found by Anthropic using agents to study the security
of open-source projects, with Ada Logics validating and reporting.

Versiones

Rangos afectados

Afectada Corregida
servo< 0.5.0
0.5.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.ioservo
Corregida 0.5.0 — —
Versiones corregidas0.5.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/servo/servo/security/advisories/GHSA-g642-f7qj-wgxp

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.