Skip to content

Local Network Access plans and default behavior #48655

Closed as not planned
Closed as not planned

Description

@PeterKoczanadon

Preflight Checklist

Problem Description

Chrome 142 is introducing a local network access permissions check and has plans to make it on by default in a future version: https://developer.chrome.com/blog/local-network-access

This feature is important for security, but having it on could interfere with legitimate use cases site to connect to resources on localhost or a private network.

When testing Electron 39.0.0 beta, this had no effect and I could not get a permissions prompt or query local network access permissions even when adding flags to the command line in Electron.

Proposed Solution

Include an option for local network access for navigator.permissions.query to allow applications to define their own local network access behavior, and define/document the default behavior for local network access checks.

Alternatives Considered

Make no changes, but document the default behavior, especially as Chrome/Chromium pushes to make local network access checks always on.

As of testing Electron 39.0.0 beta, local network access checks did not block any localhost communication, so not doing anything is a viable solution.

Additional Information

No response

Activity

  1. SAN-CODER-1 commented on Oct 25, 2025

    @SAN-CODER-1

    Hi everyone 👋
    I’ve reviewed this issue and the security.md file.
    I’d like to help clarify the default local network access behavior in the docs once it’s confirmed.
    Is this issue open for documentation contributions yet, or still under discussion?

    Thanks!

  2. PeterKoczanadon commented on Oct 27, 2025

    @PeterKoczanadon
    Author

    For this: "Is this issue open for documentation contributions yet, or still under discussion?"
    Do you mean the Electron support for LNA or the Chromium behavior?

    For Electron support plans, I'll defer to project maintainers on any plans and timelines.
    For the base Chromium support, I'm working with Google to work through some additional concerns about the default behavior and timeline.

  3. christhompson commented on Oct 30, 2025

    @christhompson

    Hi -- TL for the Local Network Access feature in Chromium upstream here.

    I think it would probably be best if Electron made use of the configuration knob that Chromium's Content API exposes here: https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/content_browser_client.h;l=2842-2859;drc=0a4bbd7daba492283f6b453c0b0a7d934f2b2ecd -- this will let Electron configure and disable LNA long term.

    In the short term for any users of Electron that are potentially affected, you can configure your app to explicitly disable the LNA feature flag. I think something like the following should work (caveat I've never personally built something with Electron!):

    app.commandLine.appendSwitch('disable-features', 'LocalNetworkAccessChecks');
    

    Eventually that feature flag will go away though, so longer term it would be best for Electron to configure this as a downstream embedder of Chromium.

  4. codebytere commented on Nov 20, 2025

    @codebytere
    Member

    See #48655 (comment) - we can eventually add some permission handling for this, but we don't do that until it's stabilized and at this point (in dev trials) it's too likely the API surface may change for us to formally introduce that into Electron. We're happy to return to this when it's released stably.

  5. christhompson commented on Nov 24, 2025

    @christhompson

    @codebytere Not sure what "released stably" means, but FYI this has been enabled-by-default in Chromium tree since M142 branch (https://chromiumdash.appspot.com/commit/99889b6bb4ab1eec0a47f0f9a2fc675bbcc32a88). It is on by default in Chrome Stable, launching in Microsoft Edge 143, and live in Firefox Nightly. Please feel free to reach out if you have any questions.

  6. HovSyan commented on Dec 30, 2025

    @HovSyan

    Greetings to everyone 👋
    @codebytere am I correct in understanding that you suggest the short term solution mentioned in #48655 (comment) and that Electron won't override LNA check also mentioned in the same comment

  7. kycutler commented on Jun 24, 2026

    @kycutler
    Contributor

    @codebytere bump on this -- we would like to support LNA in the VS Code integrated browser, but it's currently hard disabled in Electron. It isn't clear what else there is to let stabilize as this has been shipped in every major browser for a while.

    Even if it stays as a blanket allow by default, we would like to be able to configure this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions