CVE-2026-54447
Insecure file permissions expose OAuth token, allowing other users to hijack Garmin Connect accounts.
- CVSS 8.4
- 732
- Configuration Issues
- Local
garminconnect is a Python 3 API wrapper for Garmin Connect that retrieves statistics and manages activities. Prior to 0.3.5, garminconnect/client.py Client.dump creates the OAuth token directory and garmin_tokens.json without explicit owner-only modes, so a permissive umask such as 022 can leave the directory mode at 0755 and the token file mode at 0644. garmin_tokens.json contains di_refresh_token, and another unprivileged user on a shared Linux or macOS host can read the token and obtain persistent access to the victim's Garmin Connect account, including health, fitness, activity, and device data. The Garmin.login tokenstore path is affected, and a pre-existing loosely permissioned token file remains exposed until rewritten or manually restricted. This issue is fixed in version 0.3.5.
- CWE
- 732
- CVSS base score
- 8.4
- Published
- 2026-09-14
- OWASP
- A03 Sensitive Data Exposure
- Orthogonal defect classification
- Interface
- Code defect classification
- Missing Check
- Category
- Configuration Issues
- Subcategory
- Insecure Direct Object References (IDOR)
- Accessibility scope
- Local
- Impact
- Unauthorized Access
- Affected component
- garminconnect
- Fixed by upgrading
- Yes
Solution
Upgrade garminconnect to version 0.3.5 or later.
Vulnerable code sample
import os
import json
from pathlib import Path
class Client:
def __init__(self, token_dir: str):
self.token_path = Path(token_dir) / "garmin_tokens.json"
def dump(self, token_data: dict):
# VULNERABLE: creates token directory and file with default permissions
os.makedirs(self.token_path.parent, exist_ok=True)
with open(self.token_path, "w") as f:
json.dump(token_data, f)Patched code sample
import os
import json
from pathlib import Path
import stat
class Client:
def __init__(self, token_dir: str):
self.token_path = Path(token_dir) / "garmin_tokens.json"
def dump(self, token_data: dict):
# FIX: create directory and file with owner‑only permissions
os.makedirs(self.token_path.parent, mode=0o700, exist_ok=True)
fd = os.open(self.token_path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
with os.fdopen(fd, "w") as f:
json.dump(token_data, f)Cite this entry
@misc{vaitp:cve202654447,
title = {{Insecure file permissions expose OAuth token, allowing other users to hijack Garmin Connect accounts.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-54447},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-54447/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
