Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-48790

CVE-2026-48790: Turso CLI Information Disclosure Issue

CVE-2026-48790 is an information disclosure flaw in Turso CLI that exposes JWT credentials through world-readable file permissions. This article covers technical details, affected versions, and mitigation steps.

Published:

CVE-2026-48790 Overview

CVE-2026-48790 is an insecure permissions vulnerability [CWE-276] in the Turso command line interface (CLI) for the open-source Turso database. Versions prior to 1.0.26 write the user's Turso platform JSON Web Token (JWT) into settings.json using Viper's default configPermissions value of 0o644. On standard Linux and macOS systems, this leaves the credential file world-readable. Any other local user identifier (UID) on the host can read the file and recover the platform JWT. The stolen token grants full Turso platform access scoped to the victim's organizations. Version 1.0.26 resolves the issue.

Critical Impact

Any unprivileged local account on a shared host can read the Turso platform JWT and gain full access to the victim's Turso organizations.

Affected Products

  • Turso CLI versions prior to 1.0.26
  • Turso platform accounts whose JWT was persisted by a vulnerable CLI
  • Linux and macOS hosts using default umask values

Discovery Timeline

  • 2026-08-11 - CVE-2026-48790 published to the National Vulnerability Database (NVD)
  • 2026-08-12 - Last updated in NVD database

Technical Details for CVE-2026-48790

Vulnerability Analysis

The Turso CLI persists authentication state, including the platform JWT, to a local settings.json file managed through the Viper configuration library. Viper's WriteConfig path uses a default configPermissions constant of 0o644, which grants read access to group and other. When the Turso CLI wrote the settings file, it inherited these permissions rather than applying stricter credential-file semantics.

On Linux and macOS, a JWT stored at 0o644 is readable by every local UID on the machine. An attacker with any local account, including low-privileged service accounts, can cat the file and extract the bearer token. That token is a valid credential for the Turso platform application programming interface (API) and confers the same scope as the original user's session across their organizations.

Root Cause

The root cause is reliance on the upstream Viper defaults for a file that stores a bearer credential. The CLI did not narrow file mode to owner-only, and it did not enforce a private mode on the containing directory. This is a classic incorrect default permissions issue [CWE-276] applied to a secrets-bearing artifact.

Attack Vector

Exploitation requires local access to the host where the Turso CLI has been authenticated. A co-tenant user, a compromised low-privilege service account, or a container sharing the host's user namespace can read settings.json directly. No interaction with the victim is required, and the attack leaves no CLI-side artifact beyond a filesystem read.

go
// Patch: internal/settings/settings.go
// Source: https://github.com/tursodatabase/turso-cli/commit/ffb914849216ef5a86353b3fa6cee66f33af3b66

 	"github.com/tursodatabase/turso-cli/internal/flags"
 )
 
+const (
+	settingsFileMode = 0o600
+	settingsDirMode  = 0o700
+)
+
 type Settings struct {
 	changed bool
 }

The fix introduces explicit constants: settingsFileMode = 0o600 for the settings file and settingsDirMode = 0o700 for its parent directory. These modes restrict read and write access to the file owner only.

Detection Methods for CVE-2026-48790

Indicators of Compromise

  • Presence of settings.json under the Turso CLI configuration directory (typically ~/.config/turso/ on Linux or ~/Library/Application Support/turso/ on macOS) with mode 0644 or wider
  • Turso platform API calls originating from IP addresses or user agents that do not match the legitimate user's workstation
  • Unexpected creation, modification, or deletion of Turso databases, tokens, or organization members

Detection Strategies

  • Audit endpoints for the Turso CLI configuration file and flag any instance where the file mode is not 0600 and the parent directory is not 0700.
  • Correlate Turso platform audit logs with endpoint authentication telemetry to identify token use from unexpected sources.
  • Scan multi-user hosts and shared build agents for readable credential files belonging to other users.

Monitoring Recommendations

  • Alert on process reads of settings.json by any UID other than the file owner.
  • Monitor Turso API activity for anomalous organization enumeration, database creation, or token issuance.
  • Track Turso CLI version inventory across developer workstations and continuous integration (CI) runners to confirm rollout of 1.0.26.

How to Mitigate CVE-2026-48790

Immediate Actions Required

  • Upgrade the Turso CLI to version 1.0.26 or later on all developer workstations, servers, and CI runners.
  • Rotate any Turso platform JWTs issued by vulnerable CLI versions, including tokens stored on shared or multi-tenant hosts.
  • Review Turso platform audit logs for unauthorized access dating back to the first use of a vulnerable CLI version.
  • Restrict permissions on existing settings.json files manually until the upgrade completes.

Patch Information

The fix is delivered in Turso CLI 1.0.26 via commit ffb9148. The patch sets settingsFileMode to 0o600 and settingsDirMode to 0o700, ensuring that only the owning user can read the persisted JWT. Additional context is available in GitHub Security Advisory GHSA-57f6-pvx8-hwj6.

Workarounds

  • Manually apply restrictive permissions with chmod 600 on settings.json and chmod 700 on its parent directory after each CLI login.
  • Log out of the Turso CLI using turso auth logout on shared hosts and re-authenticate only on trusted single-user systems.
  • Avoid authenticating the Turso CLI on multi-tenant servers or shared jump hosts until the upgrade is complete.
bash
# Configuration example: harden existing Turso CLI credential file
chmod 700 "${XDG_CONFIG_HOME:-$HOME/.config}/turso"
chmod 600 "${XDG_CONFIG_HOME:-$HOME/.config}/turso/settings.json"

# Verify
ls -l "${XDG_CONFIG_HOME:-$HOME/.config}/turso/settings.json"
# Expected: -rw------- 1 <user> <group> ... settings.json

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.