LNS web Draft · 27 November 2026

10. Security considerations

What can attack an LNS site or its visitors, what each part checks, what each role still has to trust, and the limits that are known and not yet fixed.

Describes Names Browser 0.4.6 with core 0.3.6, the gateway at <name>.lnsweb.online (round 3, live) and lns publish, as checked on 27 November 2026. Finding IDs such as X1 or G7 are row labels in the consolidated security report of 27 November 2026, which is not yet published; section 11 summarises it. No professional audit has been done.

10.1 Threats

The design assumes each of these may be hostile:

ThreatWhat it can try
A hostile siteRun code, load outside resources, track the visitor, hang or exhaust the client with crafted HTML, CSS, SVG, fonts or images, spoof the browser's interface, poison another site's cached files, or trick the visitor into saving a file.
A hostile LEZ RPCReturn a false record or on-chain page for any name, hide a name, return huge or slow answers, or redirect the client elsewhere.
A hostile or withholding Storage peerSend wrong bytes for a CID, send nothing, or send slowly. Watch which CIDs a client asks for.
A hostile gateway operator or CDNServe anything under any name to web visitors, or read and change pages in transit. Cloudflare ends TLS for the gateway.
Phishing through namesRegister a name that looks official, such as a word like claim or support, or one close to a real project's name, and make its page look like a trusted site.

Out of scope: a compromised user machine, a compromised wallet, and attacks on the LEZ chain's own consensus.

10.2 What is enforced

These hold for the builds named above. Sections 6 to 9 give the full rules.

10.2.1 Integrity of files

A client MUST refuse any file or list from Logos Storage whose SHA-256 differs from the hash pinned in the record or in its parent list, and MUST NOT show or save unpinned Storage bytes.

Names Browser: Main.qml and logic.mjs; downloads move to Downloads only after finalize_staged_download in lib.rs matches the hash. Gateway: serve.mjs resolves with requireSha256: true and checks the hash before sending any byte.

So a Storage peer cannot change what a visitor sees. It can only withhold or delay it. Small on-chain pages, on-chain root lists and name icons are not fetched from Storage: they come with the record through the RPC, and are only as trustworthy as the record (section 10.4).

The Names Browser MUST key its file caches by SHA-256, not by CID, and MUST re-hash bytes read back from disk, so that one site cannot poison another's files.

cache.rs stores only verified bytes under <sha256>.<ext> (put_verified) (finding B10). The gateway's long-lived asset URLs carry the file's hash, /_imm/<sha256>/<name>, and accept only the lowercase hash and exact file name (serve.mjs, G5).

10.2.2 No page code

A client MUST NOT run scripts from a site, and a page MUST NOT be able to make the client fetch anything outside its own pinned site.

Names Browser: no web engine for pages; the Rust renderer (static_render.rs, sanitize.rs) draws a fixed profile, page text is shown as plain text (B1), unpinned subresources are refused (B11). Gateway: scripts removed by sanitize.mjs, and every page carries a CSP with script-src 'none', connect-src 'none', form-action 'none' and sandbox (GATEWAY_HTTP_CSP in sanitize.mjs, set by applySecurityHeaders in serve.mjs). .js files are sent as plain-text attachments (G16).

10.2.3 Resource limits

Crafted content is bounded by caps, so that one page or file cannot hang or exhaust a client. The browser caps CSS expansion, selector parts, nesting depth, SVG operations, image size (4096 px and 16 MP per image, 64 MP per page), URL length (2048 bytes) and folder depth (32). The gateway uses linear-time CSS and SVG cleaning, size-bounded caches, byte caps on what it reads (1 MiB from the RPC, 2 MiB for a list, 80 KiB for an on-chain page, 10 MiB inline or 25 MiB for a download on the gateway, with a 100 MiB ceiling in storage.mjs; derive.mjs, serve.mjs, storage.mjs), per-request timeouts, and a Storage download limiter of 8 at once with at most 2 per site (DownloadLimiter in serve.mjs). Appendix B lists every limit. Some of the gateway's fixes are so far checked only by their own tests (section 11.1).

10.2.4 The interface

10.2.5 The RPC connection

The gateway MUST talk only to its one configured RPC, refuse redirects, and cap response bodies.

validateSequencerUrl in gateway-config.mjs; redirect: "error" and capped reads in derive.mjs (G4).

This stops a hostile RPC from turning the gateway against other hosts or exhausting its memory. It does not stop a false answer (section 10.4).

10.3 Who you trust

10.3.1 Names Browser user

10.3.2 Gateway visitor

The Names Browser takes the gateway operator and Cloudflare out of delivering and checking files. It does not take them out of the record path while it uses the default RPC, which the same operator runs behind Cloudflare. A user who needs that should set an RPC they trust.

10.3.3 Publisher

10.4 RPC forgery

This is the main unresolved limit (finding X1, an accepted limit for now).

A client finds a name's record by deriving the record account and its key from the public name (derive.mjs), then asking the RPC for that account. Anyone who knows the name can derive the same key. The client checks that the sealed record opens and belongs to the name, but it has no proof that the account really holds those bytes on chain, and the record carries no owner signature.

So a hostile RPC can return a record of its own making for any name. It can point the name at any site, with hashes that match that site. The Names Browser will show it as verified, the gateway will serve it, and the browser will remember it as that name's last verified version. Every hash check after the record still holds; they just check the wrong site.

What limits the damage today:

Not yet protected. Neither client can tell a false record from a real one. Until this is fixed, "verified" means "matches the record your LEZ RPC returned", and this document uses that wording throughout.

What would fix it: checking each record against an LEZ state proof (a light client), or having owners sign their records so that a client can check the signature against the name's owner. Either would need to be added to both the browser and the gateway.

10.5 Other known limits

10.5.1 CIDs are not checked against their bytes

A client checks only the format of a CID (is_valid_cid in storage.rs), not its multihash (X2, open by design). The pinned SHA-256 is the real check, so wrong bytes are still refused. The CID is only a way to find bytes. Combined with section 10.4, nothing ties the CID itself to the owner.

10.5.2 Denial of service

10.5.3 One shared domain

Every gateway site is a subdomain of lnsweb.online, a domain used only by the gateway. Since 27 November 2026 user sites no longer share a registrable domain with the Names Wallet site on nameswallet.app. lnsweb.online is not yet on the Public Suffix List (a request is planned, not yet submitted), so until it is, browsers treat all user sites as the same registrable domain among themselves (G7, reduced, not closed). Against that risk between user sites, the gateway relies on these:

A gateway that let sites run scripts would need its own registrable domain per site, or a Public Suffix List entry.

10.5.4 Look-alike names and phishing

The gateway refuses to serve sites at reserved labels: infrastructure and trust words (support, login, verify, official and others), 41 phishing lure words (claim, airdrop, recovery, update, docs, beta and others), and every Punycode label (xn--) (isReservedLabel in reserved.mjs, G8). LNS names are limited to a-z, 0-9 and - (section 4.1), which rules out look-alike Unicode letters.

No client can stop a site from looking official inside its own page area, or a name such as alice-wallet from imitating a project called alice. The banner and the address bar show the real name; users have to read them. Abusive sites can be reported at nameswallet.app/abuse and blocked at the gateway (section 8.8).

10.5.5 Publisher

10.5.6 Builds and testing

10.6 Claims

Statements about LNS web should use wording that stays true under section 10.4. For 0.4.6:

SayNot
Names Browser has no web engine: no WebKit, no Chromium, and no JavaScript engine for pages."No JavaScript engine." Qt Quick runs its own interface code.
A page's scripts are never run.
Every file from Logos Storage is checked against the SHA-256 pinned in the LNS record (or its folder list) returned by your LEZ RPC before it is shown or saved, and a mismatch is refused. Small on-chain pages and name icons come directly from the LNS record through the RPC."Checked against the name's on-chain record", with no mention of the RPC.
Pages cannot make internet requests, load trackers, or fetch arbitrary files. The browser itself asks your LEZ RPC for the name and fetches the site's files privately from Logos Storage, including the built-in seed peer unless you turn it off."Zero external network leaks."
When the last version this browser verified is still in its cache, it shows that version, marked as older, while it fetches the new one.A promise that the last verified version is always shown.

10.7 Next

  1. Close the RPC gap: state proofs or owner-signed records, in both clients (section 10.4).
  2. Publish the 0.4.6 source, and label or archive the WebKit line on GitHub (X4). Commit the live gateway source to a public repository.
  3. Confirm the one-time Cloudflare purge of files cleaned by the older sanitizer (G36, partly), and add a rate-limit rule for *.lnsweb.online (G35).
  4. Get an independent re-check of the 14 gateway fixes so far checked only by the fixer's tests.
  5. Run 0.4.6 inside Basecamp against the round-3 cases (B31), and add a second seed-peer operator (section 2.7.1).