CVE-2025-27154: Python Token Cache File Write Without Restrictive Chmod

Method `$METHOD` writes credential/token data to a file via `open(self.$PATH, "w", ...)` without restricting the file's permissions. The created file inherits the process umask (typically yielding mode `rw-r--r--` / 0644), which exposes the stored secret to any other local user or process running as a different UID (CWE-276 — Incorrect Default Permissions; C

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2025-27154-python-token-cache-file-write-without-restrictive-chmod --engine opengrep

Description

Method `$METHOD` writes credential/token data to a file via `open(self.$PATH, "w", ...)` without restricting the file's permissions. The created file inherits the process umask (typically yielding mode `rw-r--r--` / 0644), which exposes the stored secret to any other local user or process running as a different UID (CWE-276 — Incorrect Default Permissions; C