CVE-2026-81697: openssl_encrypt before 1.4.9 KDF Downgrade via CWD-relative Configuration
opensslencrypt (pip package openssl-encrypt) versions <= 1.4.8 contain a CWD-relative configuration file resolution flaw in cryptsettings.py, where CONFIGFILE (originally the absolute per-user path ~/.cryptsettings.json) is reassigned at line 84 to the bare relative name 'cryptsettings.json'. As a result, the legacy Tk GUI's SettingsTab reads and writes KDF settings from cryptsettings.json in the process launch (current working) directory instead of the user's home directory. An attacker who plants a malicious cryptsettings.json (e.g. sha256:1 with all memory-hard KDFs disabled) can silently downgrade encryption performed in that GUI session to roughly one hash round, bypassing the weak-KDF preflight and enabling offline brute-force attacks against the resulting ciphertext. Fixed in 1.4.9.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.4.9Patch openssl_encrypt before 1.4.9 KDF Downgrade via CWD-relative Configuration
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users of openssl-encrypt versions 1.4.8 and earlier are exposed when they use the legacy Tk GUI from a current working directory where an attacker can place crypt_settings.json. The issue affects encryption performed during that GUI session.
What must an attacker do to exploit the weakness?
An attacker needs to plant a malicious crypt_settings.json in the directory from which the GUI process is launched. That file can disable memory-hard KDFs and set a weak setting such as sha256:1, causing newly created ciphertext to use a weak derivation configuration.
Is the normal per-user configuration location used by the affected GUI?
No. In affected versions, the GUI resolves crypt_settings.json relative to its process launch directory rather than using the intended per-user ~/.crypt_settings.json path.
What can be done before upgrading?
Do not launch the legacy Tk GUI from untrusted or shared directories, and inspect the launch directory for crypt_settings.json before using it to encrypt data. Upgrade to version 1.4.9 when possible.
How can I determine whether encryption may have been weakened?
Check whether the GUI was launched from a directory containing crypt_settings.json and examine that file’s KDF settings. A configuration that disables memory-hard KDFs or uses a setting such as sha256:1 indicates ciphertext created in that session may be vulnerable to offline brute-force attacks.