@@ -23,3 +23,56 @@ escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
2323
2424If the project acknowledges your report but does not provide any further
2525response or engagement within 14 days, escalation is also appropriate.
26+
27+ ## Threat Model
28+
29+ The Perspective WebSocket ` Server ` (the Python ` tornado.py ` /` aiohttp.py ` /
30+ ` starlette.py ` adapters and the Node ` WebSocketServer ` ) is not a security
31+ boundary against its ` Client ` . Any ` Client ` that can send messages to a
32+ ` Server ` is treated as the author of the queries it submits, and is permitted
33+ to create or delete ` Table ` /` View ` resources, author arbitrary
34+ [ expression columns] ( ./docs/md/explanation/view/config/expressions.md ) , and —
35+ for ` Virtual Server ` backends (DuckDB, ClickHouse, Polars, custom
36+ ` VirtualServerHandler ` ) — author SQL fragments executed under the configured
37+ database role. The ` Virtual Server ` SQL builder does not parameterize or
38+ validate client-supplied identifiers, expressions, or operators, because
39+ there is no privilege boundary inside the engine for it to enforce.
40+
41+ The bundled WebSocket adapters above are reference integrations: they do not
42+ implement authentication, authorization, CSRF protection, rate limiting, or
43+ origin enforcement, and are not intended to be exposed directly to untrusted
44+ networks. Production deployments must place an authenticating reverse proxy,
45+ application-framework middleware, or API gateway between the network and the
46+ ` Server ` .
47+
48+ ### In-browser WASM deployments are not affected
49+
50+ This applies only when the ` Server ` runs in a separate process reached
51+ over a network transport (WebSocket). In-browser deployments — including
52+ ` perspective ` running entirely in a Web Worker, the
53+ [ ` perspective-server ` WASM build] ( ./docs/md/explanation/architecture.md ) ,
54+ [ ` duckdb-wasm ` ] ( ./docs/md/how_to/javascript/virtual_server/duckdb.md ) ,
55+ and any other ` Virtual Server ` whose backend executes inside the browser
56+ tab — do not have this concern. The ` Client ` and ` Server ` share a single
57+ security context (the browser tab, under the same-origin policy of the
58+ embedding page), there is no network transport for a third-party principal
59+ to reach, and the only principal who can submit queries is the same user who
60+ loaded the page. SQL or expression "injection" by that user against a backend
61+ running inside their own tab is not a privilege escalation.
62+
63+ ### In scope
64+
65+ The following remain in scope for security reports:
66+
67+ - Memory-safety bugs in the C++ engine, Rust crates, or WASM module.
68+ - Bugs in the ` <perspective-viewer> ` Shadow DOM, CSS, or sanitization paths
69+ that allow injected markup or styles to escape the component or affect
70+ the embedding page.
71+ - Crashes, hangs, panics, or denial-of-service in the engine reachable from
72+ well-formed protobuf messages.
73+ - Breaches of the trust model above — for example, a ` Client ` causing effects
74+ on a different ` Client ` 's ` Server ` state in a configuration where those
75+ ` Client ` s share a ` Server ` but are intended to be isolated, or an
76+ expression column reaching state outside the ` Server ` it was authored
77+ against.
78+ - Vulnerabilities in the published artifacts themselves (supply-chain).
0 commit comments