dpapi-config: Windows DPAPI library encrypts secrets in JSON config files
Article Content
- •dpapi-config encrypts only listed string secrets in JSON config files using Windows DPAPI, with no master password or key file.
- •The package raises CredentialError instead of writing plaintext when DPAPI is unavailable, according to the project description.
- •Encryption functions are Windows-only; the read path still works on plaintext files.
- •Migration of plaintext files is one-way and older builds will read migrated secrets as missing.
- •The package does not tighten file ACLs, so users must apply icacls or SetFileSecurity for shared locations.
A Python package named dpapi-config, published on PyPI and GitHub, encrypts selected string fields in JSON configuration files using Windows DPAPI. DPAPI derives the key from the logged-in Windows account, so no master password or key file is required.
Encrypted fields are replaced with a "dpapi:" envelope, leaving the file a valid JSON document. The package is described as failing closed: if DPAPI is unavailable, encryption functions raise CredentialError rather than writing plaintext. Encryption is Windows-only; the read path still works on plaintext files.
Migration of existing plaintext files occurs only when load() is called with migrate=True, and the migration is one-way. The package does not tighten file ACLs, does not support a keychain backend, does not encrypt non-string values, and does not traverse lists.
The sources describe a fix to an earlier version that returned plaintext on DPAPI failure. The articles are a PyPI listing and two GitHub pages with identical text; no vulnerability, attack, or exploitation is reported.
Ask AI about this cluster
Answers cite the sources they use
More articles in this cluster (4)
Common questions
Does this package expose a vulnerability?
Am I affected if I use plaintext configs?
What should a Windows admin do with shared config files?
Continue Reading
React Server Components RCE Vulnerability CVE-2025-55182 Disclosed and Patched A critical unauthenticated remote code execution vulnerability, CVE-2025-55182, exists in React Server Components, reported by Lachlan Davidson on November 29 and rated CVSS 10.0. The flaw lies in how React decodes payloads sent to React Server Function endpoints. Vulnerable versions are 19.0, 19.1.0, 19.1.1, and…
Critical WP Rocket Path Traversal RCE (CVE-2026-125812) Under Active Exploitation CVE-2026-125812 is a path traversal flaw in the WP Rocket WordPress caching plugin, fixed in version 3.24.2, that allows unauthenticated remote code execution. Patchstack scores it CVSS 3.1 9.8 and says every release before 3.24.2 is affected; WP Media states the plugin is installed on more than 5.6 million sites. The…