cvelo
P4 · InfoCVSS 2.0EPSS 0.2%

The Google Drive client secret is written with permissions readable by other local users in whatstk

  • CVE-2026-141426
  • GHSA-cxvf-m5wc-m5fp
  • EUVD-2026-140469

Description

Incorrect Default Permissions (CWE-276) in gdrive_init() (whatstk/utils/gdrive.py) in whatstk from 0.5.0 before 0.9.0 allows another user of the same machine to read the Google Drive OAuth client secret of the user who ran it. The function creates ~/.config/whatstk/gdrive with os.makedirs and no mode argument, copies the supplied client secret file to client_secrets.json with shutil.copyfile, and writes settings.yaml through a plain open call, so all three take whatever the process umask allows. Under a default umask of 022 the directory is created 0755 and both files 0644. shutil.copyfile does not carry the source file's permissions over, so a client secret the user had restricted to 0600 is written out at 0644. Whether the files end up readable by other local users therefore depends on the umask in force when gdrive_init runs and on the permissions of the directories above them, and not on the permissions of the file the user supplied. The refresh token in credentials.json is written by pydrive2 rather than by whatstk and is observed at 0600. This results in the OAuth client secret and the generated settings being readable in plain text by other users of the machine.

Text from the CVE.org record.

Recommendation

  • lucasrodes whatstk

    • If you run a version from 0.5.0 to before 0.9.0update to 0.9.0 or laterMajor version change: expect breaking changes

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • lucasrodes whatstk

    Affected versionsFixed in
    from 0.5.0 to before 0.9.00.9.0

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.