GHSA-57f6-pvx8-hwj6: turso-cli persists Turso platform JWT with world-readable (0o644) file permissions
The turso-cli tool stores the user's Turso platform JWT token in a settings.json file with world-readable file permissions (0o644) on Linux and macOS systems. This allows any local user on the same host to read the token and gain full access to the user's Turso platform organizations. The token grants capabilities such as creating or destroying databases, rotating credentials, exfiltrating data, and changing billing settings. The issue arises because the underlying Viper library defaults to 0o644 permissions for config files, and turso-cli does not override this to restrict access. A patch is available that sets the file permissions to 0o600, restricting access to the owner only. Until patched, users can manually tighten permissions on the settings file and its directory.
AI Analysis
Technical Summary
The turso-cli persists the Turso platform JWT token in a settings.json file with default file permissions of 0o644 due to Viper library's default configPermissions setting. This results in the credential file being world-readable on standard Linux and macOS systems. Any other local user on the host can read this file and obtain the JWT, which grants full Turso platform access scoped to the user's organizations. The token is stored in plaintext JSON alongside organization and username fields. The vulnerability deviates from common CLI credential storage practices, which typically use 0o600 permissions. The issue can be fixed by configuring Viper to use 0o600 permissions and optionally applying chmod to the file and its directory to enforce stricter access controls. A patch commit is available that implements this fix. The affected versions are all turso-cli versions prior to 1.0.26.
Potential Impact
An attacker with access to the same host as the user can read the settings.json file due to its world-readable permissions and obtain the Turso platform JWT token. This token grants full access to the user's Turso platform organizations, allowing the attacker to create or destroy databases, rotate credentials, exfiltrate data, and change billing settings. The vulnerability affects multi-user or shared environments such as cron jobs, daemons running under different users, sandboxed CI runners, containers with bind-mounted home directories, and shared developer or jumpbox hosts.
Mitigation Recommendations
A patch is available that sets the settings.json file permissions to 0o600, restricting access to the owner only. Users should upgrade to turso-cli version 1.0.26 or later. Until patched, users can manually restrict permissions by running 'chmod 600' on the settings.json file and 'chmod 700' on the enclosing directory after each operation that recreates the file (e.g., after 'turso auth login'). Additional defense-in-depth measures include applying 'os.Chmod' to the file and directory programmatically after persistence and on read to ensure permissions remain restrictive.
GHSA-57f6-pvx8-hwj6: turso-cli persists Turso platform JWT with world-readable (0o644) file permissions
Description
The turso-cli tool stores the user's Turso platform JWT token in a settings.json file with world-readable file permissions (0o644) on Linux and macOS systems. This allows any local user on the same host to read the token and gain full access to the user's Turso platform organizations. The token grants capabilities such as creating or destroying databases, rotating credentials, exfiltrating data, and changing billing settings. The issue arises because the underlying Viper library defaults to 0o644 permissions for config files, and turso-cli does not override this to restrict access. A patch is available that sets the file permissions to 0o600, restricting access to the owner only. Until patched, users can manually tighten permissions on the settings file and its directory.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The turso-cli persists the Turso platform JWT token in a settings.json file with default file permissions of 0o644 due to Viper library's default configPermissions setting. This results in the credential file being world-readable on standard Linux and macOS systems. Any other local user on the host can read this file and obtain the JWT, which grants full Turso platform access scoped to the user's organizations. The token is stored in plaintext JSON alongside organization and username fields. The vulnerability deviates from common CLI credential storage practices, which typically use 0o600 permissions. The issue can be fixed by configuring Viper to use 0o600 permissions and optionally applying chmod to the file and its directory to enforce stricter access controls. A patch commit is available that implements this fix. The affected versions are all turso-cli versions prior to 1.0.26.
Potential Impact
An attacker with access to the same host as the user can read the settings.json file due to its world-readable permissions and obtain the Turso platform JWT token. This token grants full access to the user's Turso platform organizations, allowing the attacker to create or destroy databases, rotate credentials, exfiltrate data, and change billing settings. The vulnerability affects multi-user or shared environments such as cron jobs, daemons running under different users, sandboxed CI runners, containers with bind-mounted home directories, and shared developer or jumpbox hosts.
Mitigation Recommendations
A patch is available that sets the settings.json file permissions to 0o600, restricting access to the owner only. Users should upgrade to turso-cli version 1.0.26 or later. Until patched, users can manually restrict permissions by running 'chmod 600' on the settings.json file and 'chmod 700' on the enclosing directory after each operation that recreates the file (e.g., after 'turso auth login'). Additional defense-in-depth measures include applying 'os.Chmod' to the file and directory programmatically after persistence and on read to ensure permissions remain restrictive.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-57f6-pvx8-hwj6
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-48790"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a3ef76a27e9c79719fee804
Added to database: 06/26/2026, 22:04:26 UTC
Last enriched: 06/26/2026, 22:08:08 UTC
Last updated: 06/27/2026, 01:58:26 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.