GitHub CLI 2.106.0 was released on 25 November 2026 with fixes for seven security vulnerabilities and an important change to how gh auth logout works: it now revokes your OAuth token on GitHub instead of only deleting it from your machine. If you use gh on a laptop, in CI, or inside AI coding agents, this is an upgrade to do today.

This guide explains what was fixed, who is affected, how to upgrade on each platform, and what the new logout behaviour means for scripts. Everything here comes from the official v2.106.0 release notes and the help text of the 2.106.0 binary.

Step 1: Check your version and upgrade

gh --version
# gh version 2.106.0 (2026-11-25)

If you see anything older, upgrade with the same tool you used to install it:

# macOS (Homebrew)
brew upgrade gh

# Windows (winget)
winget upgrade --id GitHub.cli

# Debian/Ubuntu (official apt repository)
sudo apt update && sudo apt install gh

# Or download a release archive
curl -sL -o gh.tgz https://github.com/cli/cli/releases/download/v2.106.0/gh_2.106.0_linux_amd64.tar.gz
tar xzf gh.tgz && ./gh_2.106.0_linux_amd64/bin/gh --version

Package managers sometimes lag behind GitHub releases by a day or two, so confirm the version after upgrading.

Step 2: Understand the seven security fixes

Most of the fixes deal with terminal escape sequences. When a program prints untrusted text that contains control characters, a malicious repository, API response or skill description can move the cursor, rewrite earlier lines, change the window title or, in some terminals, do worse. gh already filtered these sequences, but several paths slipped through:

  1. C1 control characters were not recognised by the escape-sequence check used by gh repo read-file, gh api and other commands (GHSA-45h6-2fh4-pr93).
  2. Verbose and API-debug logging could print control characters from request and response data (GHSA-4946-22jg-pg7m).
  3. gh codespace ports could print control characters from port labels (GHSA-5v78-vjjq-j2fj).
  4. gh agent-task view --log could print control characters from tool-call names and arguments (GHSA-3j6c-526c-w465).
  5. gh skill install and gh skill search could print control characters from remote skill text (GHSA-mjfw-qpmw-c8p9).

Two fixes are different in kind:

  1. gh skill update could install a skill from a different repository that reused the installed skill’s name (GHSA-q2rq-2r2v-2jm5). This is a supply-chain issue: an update could silently swap the source of something your AI agent runs.
  2. gh codespace jupyter could expose localhost cookies and local development services when connecting to a malicious Codespace (GHSA-mrhx-xw2w-4289).

Who should worry most

  • Anyone using gh skill to install agent skills. Re-check where your installed skills come from after upgrading.
  • Anyone piping gh api or gh repo read-file output into a terminal from repositories you don’t control.
  • Codespaces users who connect Jupyter to Codespaces they didn’t create.
  • People who run gh with debug logging (for example GH_DEBUG=api) in shared CI logs.

The advisories linked above contain the official severity and affected versions for each issue.

Step 3: Learn the new gh auth logout

Before 2.106.0, gh auth logout only removed credentials from your machine. The OAuth token itself stayed valid on GitHub. If it had been copied somewhere (a backup, a leaked dotfile, a CI cache), it kept working.

Now, according to the command’s help text:

  • gh auth logout revokes the selected account’s GitHub CLI OAuth token, then removes it locally. Copies of the same token used elsewhere stop working. Tokens issued independently are not revoked.
  • Other token types (for example a personal access token you pasted in) are removed locally, with a warning that they were not revoked.
  • After logout, saved HTTPS credentials for the host are also removed from Git credential helpers. If that cleanup fails, gh prints a warning but still succeeds.
  • If revocation fails or can’t be confirmed, local credentials are kept so you can retry, and the command exits with an error.

To get the old local-only behaviour, use the new flag:

gh auth logout --hostname github.com            # revoke + remove (new default)
gh auth logout --hostname github.com --no-revoke  # local only, token stays valid

What this means for scripts

If you share one gh OAuth token across machines (for example, copied hosts.yml files), running gh auth logout on one machine now logs out all of them, because the token is revoked. Review scripts that call gh auth logout during cleanup:

# Ephemeral CI runner: revoking is usually what you want
gh auth logout --hostname github.com || echo "logout failed, check token state"

# Shared token you intend to keep using elsewhere
gh auth logout --hostname github.com --no-revoke

Also note that the command can now fail (exit non-zero) when revocation can’t be confirmed, for example on a runner without network access. If your cleanup step runs with set -e, decide whether that should break the job.

In GitHub Actions, most workflows authenticate with GH_TOKEN set to the job’s GITHUB_TOKEN, which expires on its own. Those workflows don’t need gh auth logout at all.

Step 4: Other fixes in 2.106.0

  • Expiring tokens on GitHub Enterprise Server before 3.23: requests for expiring credentials now fall back to a non-expiring token with a warning, instead of failing with invalid_scope. This affects gh auth login, gh auth refresh and the expiring_credentials setting.
  • Credential refresh race: a valid credential refreshed by another process is kept after a refresh rejection.
  • gh run view logs keep their output after lines longer than 64 KiB.
  • The docs now state that GitHub Event Streams may deliver events more than once, so make your consumers idempotent.

A quick security checklist

  1. Upgrade every machine and CI image to gh 2.106.0.
  2. Run gh skill list (or check your skill directory) and confirm each skill’s source repository.
  3. Avoid GH_DEBUG=api in public CI logs.
  4. Decide, per script, whether gh auth logout should revoke tokens, and add --no-revoke where it shouldn’t.
  5. Rotate any long-lived tokens that may have been copied between machines.

Takeaway

GitHub CLI 2.106.0 closes seven security issues, mostly around untrusted terminal output plus a skill-update supply-chain bug and a Codespaces Jupyter exposure. It also makes gh auth logout truly log you out by revoking the OAuth token and clearing Git credential helpers. Upgrade now, re-check your installed skills, and add --no-revoke only where you really need the old behaviour. The gh auth logout manual has the full option list.