Sensitive Data Stored Insecurely by the Client

The client stores credentials, tokens or sensitive data on the local system in cleartext or in a form that is easily reversed.

SeverityMedium
CVSS 3.15.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.06.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-312: Cleartext Storage of Sensitive Information
OWASP Top 10A06:2025 Insecure Design
MITRE ATT&CKT1552.001 Credentials In Files, T1552.002 Credentials in Registry, T1005 Data from Local System
CategoryCryptographic Failures

Description

The thick client stores sensitive information on the local system without adequate protection. Typical examples are saved usernames and passwords, session or refresh tokens, connection strings, encryption keys, and business or personal data cached for offline use. They are found in configuration files, the registry (under HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE), local databases such as SQLite or Access files, log files, temporary files and exported reports.

Protection is often absent or only apparent: values stored in cleartext, Base64 encoded, obscured with a simple XOR, or encrypted with a key held in the application itself, all of which can be reversed by anyone who can read the files and the client, including malware running as the user and anyone who obtains the device or a backup of it. Data written to shared locations, such as C:\ProgramData or a folder at the root of the system drive, is frequently readable by every user of the computer, so on shared workstations and terminal servers other users can recover it too.

Recovered credentials and tokens let an attacker sign in to the application or its back-end services as the user, potentially from elsewhere, and cached data may include personal or commercially sensitive records. The attacker needs some access to the system first, which limits the rating.

The weakness is identified by using the application while monitoring the files and registry keys it writes, for example with Process Monitor, then reviewing those locations and their permissions for sensitive values, and by decompiling the client to understand any encoding or encryption it applies.

Remediation

Store as little as possible locally, and protect what remains with the operating system's facilities:

  • Do not store users' passwords. Where the client needs to remember a sign-in, store a revocable token with a limited lifetime instead.
  • Protect secrets that must be kept with the Windows Data Protection API (DPAPI), for example through the ProtectedData class in .NET with user scope, or with Windows Credential Manager, rather than with a key held in the application.
  • Keep cached data to what is needed, encrypt local databases with a key protected by DPAPI, and delete temporary files and caches when they are no longer needed.
  • Write per-user data to the user's own profile rather than to shared locations, and set restrictive permissions on any file or registry key the application creates.
  • Make sure logs and diagnostic output do not record credentials, tokens or sensitive data.

Confirm the fix by repeating the review of files and registry keys written during use, including after sign-out.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Thick Clients Findings

Every Thick Clients finding