garminconnect CVE-2026-54447
HIGHSeverity by source
AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Local read by a co-located unprivileged user (AV:L/PR:L), default umask makes it reliable (AC:L), and host-file exposure compromising an off-host account justifies S:C with C:H/I:H, A:N.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Lifecycle Timeline
3DescriptionGitHub Advisory
Insecure Permission Assignment for Garmin OAuth Token Store
Summary
garminconnect (≤ 0.3.4) wrote its OAuth token store to disk without restricting file-system permissions. Under the default Linux umask (022) the token file garmin_tokens.json was created world-readable (0o644). The file contains the DI refresh token, so any other local user on a shared host could read it and obtain persistent, unauthorized access to the victim's Garmin Connect account.
- Severity: High
- Weakness: CWE-732 (Incorrect Permission Assignment for Critical Resource)
- Affected versions:
<= 0.3.4 - Patched version:
0.3.5
Details
Client.dump() created the token directory and file with no mode argument, leaving permissions entirely to the process umask:
def dump(self, path: str) -> None:
p = Path(path).expanduser()
if p.is_dir() or not p.name.endswith(".json"):
p = p / "garmin_tokens.json"
p.parent.mkdir(parents=True, exist_ok=True)
# no mode=
p.write_text(self.dumps())
# no permission restrictionThe serialized payload includes di_token, di_refresh_token, and di_client_id. The call is in the core library (Garmin.login(tokenstore=...) persists tokens this way), and all shipped usage examples default the token store to ~/.garminconnect.
Under umask 022 the resulting permissions were:
- token directory →
0o755 garmin_tokens.json→0o644(world-readable)
A separate, unprivileged user on the same machine could read the file with a plain open() - no elevated privileges required - and extract the refresh token.
Impact
Local credential theft / privilege escalation on multi-user Linux or macOS hosts running under a permissive umask. The stolen refresh token can be exchanged for fresh access tokens via Garmin's OAuth endpoint, granting ongoing access to the victim's account (health/fitness data, activity history, device management) until the token is revoked.
Patch
Fixed in 0.3.5 (commit 77a3837). dump() now creates the directory as 0o700 and writes the token file as 0o600 regardless of umask - using os.open(..., O_CREAT|O_WRONLY|O_TRUNC, 0o600) with O_NOFOLLOW where available, plus a defensive chmod that also tightens a pre-existing loose file:
p.parent.mkdir(mode=0o700, parents=True, exist_ok=True)
with contextlib.suppress(OSError):
p.parent.chmod(0o700)
flags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
if hasattr(os, "O_NOFOLLOW"):
flags |= os.O_NOFOLLOW
fd = os.open(p, flags, 0o600)
with os.fdopen(fd, "w", encoding="utf-8") as f:
f.write(self.dumps())
with contextlib.suppress(OSError):
p.chmod(0o600)Verified under umask 022: directory 0o700, file 0o600, no group/other access.
Workarounds
If you cannot upgrade immediately, restrict the token store manually and keep it owner-only:
chmod 700 ~/.garminconnect
chmod 600 ~/.garminconnect/garmin_tokens.jsonRemediation
- Upgrade to
garminconnect >= 0.3.5:
pip install --upgrade garminconnect- Fix any token file already on disk - upgrading only tightens permissions
on the *next* write, so an existing world-readable file stays exposed until then:
chmod 600 ~/.garminconnect/garmin_tokens.json
# or remove it and log in again to mint a fresh token store- **If the file was exposed on a shared host, treat the refresh token as
compromised.** Re-authenticate (delete the token store and log in again) so a new token is issued; consider the previously stored token potentially read by others until rotated.
Credit
Reported by EQSTLab via a private security advisory. garminconnect thanks them for the detailed, responsible disclosure.
AnalysisAI
Local credential theft in the garminconnect Python library (versions <= 0.3.4) stems from writing its OAuth token store to disk without an explicit file mode, so under the default umask 022 the file garmin_tokens.json - containing the DI refresh token - is created world-readable (0o644). Any unprivileged co-tenant on a shared Linux or macOS host can read the token and exchange it at Garmin's OAuth endpoint for fresh access tokens, gaining persistent access to the victim's Garmin Connect account. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Exploitation requires: (1) the victim uses garminconnect <= 0.3.4 with token persistence enabled (Garmin.login(tokenstore=...), the default in all shipped examples pointing at ~/.garminconnect); (2) the token file is written under a permissive umask (the default 022, producing 0o644); and (3) the attacker already holds a separate, unprivileged interactive local account on the same host with read access to the victim's home path. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The provided CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N, base 8.4 High) is internally consistent with the description: exploitation is local (a second user account on the same host), needs no elevated privileges, no user interaction, and the scope change reflects that a host-local file exposure cascades into full compromise of an off-host cloud account. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | On a shared Linux jump host, a victim runs a script that logs into Garmin Connect via garminconnect 0.3.4, which writes ~/.garminconnect/garmin_tokens.json as 0o644. A separate unprivileged local user simply runs `cat /home/victim/.garminconnect/garmin_tokens.json`, extracts di_refresh_token, and replays it against Garmin's OAuth endpoint to mint access tokens and read/modify the victim's health data and registered devices. … |
| Remediation | Vendor-released patch: upgrade to garminconnect >= 0.3.5 (pip install --upgrade garminconnect), which forces the directory to 0o700 and the token file to 0o600 via os.open with O_CREAT|O_NOFOLLOW regardless of umask (commit 77a3837). … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours: identify all systems running garminconnect ≤0.3.4, prioritize shared or multi-tenant deployments, and audit for world-readable garmin_tokens.json files. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same technique Privilege Escalation
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-wjhr-76vg-2hvc