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:
| Threat | What it can try |
|---|---|
| A hostile site | Run 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 RPC | Return 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 peer | Send wrong bytes for a CID, send nothing, or send slowly. Watch which CIDs a client asks for. |
| A hostile gateway operator or CDN | Serve anything under any name to web visitors, or read and change pages in transit. Cloudflare ends TLS for the gateway. |
| Phishing through names | Register 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
- The Names Browser strips direction-changing (BiDi) and control characters from titles, file names, tabs, Favorites, History and the record's bio (
clean_display_textinlinks.rs,sanitizeDisplayTextinlogic.mjs). - The "verified" badge resets on every navigation, Stop and error (B7). An older cached version is shown only under its own name (
extractSiteInfoinlogic.mjs, B20). - A download needs a click, shows the file name, CID and hash, and lands only after its hash matches (B6, B13). An outside link needs confirmation, and only HTTPS links open (B8).
- Site fonts cannot replace the interface fonts or generic families (B12).
- On the gateway, a "user site" banner is the first element of every HTML page, and the gateway writes the page frame itself, so page markup and CSS cannot hide it (
sanitize.mjs, G19 to G21).
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
- Your LEZ RPC, fully, for what a name points to. It can point a name at other content, hide a name, and see which names you open (section 10.4 and section 2.6).
- Logos Storage, including the built-in seed peer, only to deliver files. It cannot change them. It can withhold or slow them.
- Cloudflare, only if your RPC is behind it. The default RPC,
lez.nameswallet.app, is.
10.3.2 Gateway visitor
- Cloudflare, which ends TLS and could read or change any page (sections 8.10 and 8.12).
- The gateway operator, who could serve anything under any name.
- The gateway's RPC, with the same limit as above.
- The gateway's Storage node, only to deliver bytes, which the gateway checks before sending.
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
- Your wallet and
namestool, which sign the record update.lns publishnever reads your keys. - The Storage node you upload to, only to keep and serve the files. Every hash is computed on your machine (
publish.mjs) and pinned in the record, so the node cannot forge your site. It can lose or withhold it. - Your RPC, for the check after publishing.
- Your own
lns.json. Itshttps.commandruns through a shell (single-publish.mjs), so runlns publishonly in a folder you trust.
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:
- The gateway uses one fixed HTTPS RPC, refuses redirects and caps bodies (section 10.2.5).
- The Names Browser uses the RPC that Basecamp's Names module is set to, so a user can choose one they trust.
- An older cached version is shown only under its own name, so a false record cannot show one name's site under another (B20).
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
- A Storage peer, or the RPC, can always withhold. The client then shows an error or the last verified version, never unverified bytes.
- The gateway has origin limits (download limiter, Argon2id and RPC rate limits in
flood.mjs, timeouts), but no Cloudflare rate-limit rule on*.lnsweb.online(G35, open). Because the gateway uses no Cloudflare Worker, a flood costs nothing on Cloudflare (section 8.10), but cache misses use the origin's bandwidth and CPU. - In the Names Browser, the per-page image budget can be counted up to about twice its 64 MP limit when cached images load before the page attaches (B27, partly fixed). Each image is still capped at 16 MP and decoded at no more than 2048 px, so the effect is bounded. A full fix would share one budget between the Rust renderer and the interface.
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:
- No scripts run: the CSP has
script-src 'none'andsandbox, which also gives each page a null origin. - The gateway never sends
Set-Cookie. - The banner on every page, and reserved labels.
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
- The HTTPS check in
lns publishfollows redirects and reads whole bodies with no cap (P6, open). It is your own tool reading your own site, so the risk is small. The fix isredirect: "error"and a byte cap, as the gateway already does. - The
https.commandinlns.jsonruns through a shell (section 10.3.3).
10.5.6 Builds and testing
- The public GitHub repository
LNS_Browserstill holds the old WebKit 0.3.0 line, which runs sandboxed page JavaScript and a loopback server (X4, open). Anyone building from it gets the round-1 design, not 0.4.6. Only the 0.4.6 package from nameswallet.app/browser is covered here. - The core 0.3.6 binary is tied to its source by one string, not by a reproducible build.
- No round-3 behaviour has been tried inside a running Basecamp (B31, open). The browser findings rest on reading the code and on its JavaScript tests.
10.6 Claims
Statements about LNS web should use wording that stays true under section 10.4. For 0.4.6:
| Say | Not |
|---|---|
| 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
- Close the RPC gap: state proofs or owner-signed records, in both clients (section 10.4).
- 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.
- 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). - Get an independent re-check of the 14 gateway fixes so far checked only by the fixer's tests.
- Run 0.4.6 inside Basecamp against the round-3 cases (B31), and add a second seed-peer operator (section 2.7.1).