Skip to content
FIRERUN.

The BaaS & deploy-platform newsroom for builders

Subscribe

Netlify

Netlify CLI Moves Tokens Off Disk, but an Old Install Puts Them Back

Update every global Netlify CLI install and run netlify status: login tokens now go to the OS keychain, but older copies write them back to plain text.

Abstract flat-vector editorial illustration for "Netlify CLI Moves Tokens Off Disk, but an Old Install Puts Them Back"

Netlify CLI now keeps its login token encrypted in the operating system’s keychain instead of a plain-text file, closing a hole that let any local script read a token with full control of a Netlify account (Netlify changelog, Nov. 17, 2026). The change starts in CLI version 27.18.0, and it only protects developers who migrate and keep every copy of the CLI current.

What Changed

Until now the CLI wrote tokens in plain text to a local config file, ~/Library/Preferences/netlify/config.json on macOS. Netlify said in the changelog that because those tokens “grant full access to manage your Netlify account and projects,” the file was exposed to “any malicious script or local process with disk read access.” It said keychain storage limits the damage from a breached machine or a prompt injection attack.

The CLI now uses Keychain on macOS, Windows Credential Manager on Windows and the Secret Service API on Linux, which Netlify said is standard on GNOME and KDE. netlify login saves new tokens there, and the system may ask for a fingerprint or password when the CLI reads them.

Existing tokens don’t move on their own. During an interactive command the CLI offers to migrate a plain-text token. Accepting refreshes the login, stores the token in the keychain and removes the old file entry. Declining is remembered, so the prompt does not come back.

Where It Falls Back to Plain Text

A token can still end up on disk. If the keychain is unavailable or a write fails, the CLI falls back to plain text automatically. Setting NETLIFY_USE_LEGACY_AUTH_STORAGE=1 turns keychain storage off. And an older CLI install can revert the credentials to plain text, which is why Netlify told developers with several global installs, under nvm, pnpm or Homebrew, to update all of them.

The local Netlify MCP server also has to catch up. Netlify said @netlify/mcp 1.22.1 or later is needed to read keychain-stored credentials. npm lists 1.22.1 as published Nov. 13, the same day as CLI 27.18.0. The current CLI release on npm is 27.20.1.

What to Do

  • Run npm install -g netlify-cli@latest under every Node manager on the machine, not just the one in the current shell.
  • Run netlify login --new to migrate now, then netlify status to confirm where the token lives.
  • Update @netlify/mcp to 1.22.1 or later if an editor or agent runs the local MCP server.
  • On a headless Linux box without a Secret Service provider, expect the plain-text fallback and treat that file as a secret.

Our Take

This is the right default, and it arrives late. A token that sits in a readable JSON file is what a poisoned npm package or a coding agent gone wrong goes looking for, and Netlify named that risk itself.

The fallback design undercuts it. The CLI drops back to plain text on its own and remembers one “no” for good, while a stale install can undo the migration. Updating the CLI won’t tell anyone which of those happened. netlify status will, so run it after every update.

Stay in the loop

Get new articles in your inbox

We'll only email you when a new article drops. Unsubscribe anytime.