Summary
Electerm used deterministic AES-192-CBC encryption with a fixed zero IV, constant KDF salt, and no message authentication for synced bookmark and profile data.
This design allows attackers to crack common passwords across different installs and to modify encrypted configuration or bookmark data via undetectable ciphertext bit-flips.
Affected context
The vulnerability affects Electerm deployments that use the built-in sync mechanism to store or share bookmarks and profile configuration data.
In this context, user secrets (such as passwords, connection details, or sensitive configuration fields) are encrypted using AES-192-CBC with a fixed zero IV and a constant KDF salt, and the resulting ciphertext is not protected with a MAC or authenticated encryption.
When such encrypted blobs are stored in locations that an attacker can read or modify—such as shared storage, synced folders, or compromised endpoints—the cryptographic weaknesses become exploitable.
Exploit preconditions
- Attack surface: Synced or exported Electerm bookmark/profile data at rest (files, database entries, or cloud-sync artifacts).
- Required access: Ability to read and/or modify encrypted Electerm configuration or bookmark data. This could be via local file access, compromised sync storage, or access to backups.
- Trigger point: The application decrypts the stored data using user-supplied secrets or preconfigured keys whenever it loads bookmarks or profiles.
- Why exploitation is possible:
- The use of a fixed zero IV in CBC mode makes encryption deterministic, allowing identical plaintexts to map to identical ciphertexts, enabling pattern analysis and password guessing.
- A constant KDF salt across installs weakens resistance to precomputation (e.g., rainbow tables) and facilitates password cracking across multiple users and devices.
- Absence of a MAC or authenticated encryption means ciphertext modifications are not detected, allowing reliable bit-flip attacks that alter decrypted values without alerting the user or the application.
Why this happens
The root cause is a combination of insecure cryptographic design decisions that collectively violate basic confidentiality and integrity guarantees:
- CWE-326 (Inadequate Encryption Strength): While AES-192 itself is strong, its insecure usage (fixed IV, deterministic behavior, and predictable KDF configuration) significantly undermines practical security.
- CWE-329 (Not Using a Random IV with CBC Mode): CBC mode requires a unique, unpredictable IV per message. Using a fixed zero IV makes ciphertext patterns correlate directly with plaintext patterns, especially damaging for structured configuration data and repeated passwords.
- CWE-759/CWE-916 (Weak KDF Usage): A constant salt and potentially insufficient KDF hardness enable attackers to reuse work when attacking many encrypted datasets, making cross-install password cracking more feasible.
- CWE-353 (Missing or Inadequate Cryptographic Hash for Integrity): No message authentication code or authenticated-encryption scheme is applied, so ciphertexts can be modified without detection.
Abstractly, the pattern is: sensitive configuration data is encrypted using a deterministic scheme with predictable parameters and no integrity protection, so attackers can both learn secrets and safely tamper with data.
Potential impact
- Attackers can crack commonly used passwords and passphrases used to protect Electerm synced data, especially when they can perform offline guessing.
- Compromise of confidentiality for stored bookmarks and profiles, including hostnames, usernames, ports, or other sensitive connection metadata.
- Undetected modifications of configuration or bookmark entries via ciphertext bit-flips, potentially redirecting connections to attacker-controlled servers.
- Creation of malicious or corrupted bookmarks that can be synced across user devices, leading to persistent misconfiguration or further compromise.
- Cross-install correlation of users and configurations due to deterministic encryption patterns, enabling privacy leakage and profiling.
General mitigation guidance
Effective mitigation focuses on correcting the cryptographic design rather than patching around specific attack vectors:
- Use an established authenticated-encryption mode (e.g., an AEAD construction) that provides both confidentiality and integrity for all stored configuration and bookmark data.
- Ensure per-record, randomly generated IVs or nonces for encryption in CBC or other stateful modes; do not reuse or hard-code IVs.
- Apply a modern, memory-hard KDF (e.g., using per-user, per-install random salts and sufficient iteration count or cost factor) to derive keys from user passwords.
- Treat all synced configuration content as potentially exposed: minimize sensitive data stored, and consider additional application-level validation (e.g., validating hostnames or connection targets).
- Follow cryptographic best practices and vetted libraries, avoiding custom or ad-hoc schemes, and regularly subject the design to security review and threat modeling.
How teams detect issues like this
Detection is best approached by analyzing both code and cryptographic behavior:
- Static analysis and code review:
- Look for hard-coded IVs, zero-initialized IV buffers, or repeated IV values across multiple encryption operations.
- Identify constant salts or keys passed into KDF or key-derivation functions and flag password-based encryption routines without unique per-user salts.
- Check for encryption calls that output data without any corresponding MAC computation or AEAD tag verification during decryption.
- Verify that decryption routines enforce integrity checks and fail closed on any verification failure.
- Configuration and policy enforcement:
- Establish internal guidelines that disallow non-random IVs, fixed salts, and non-authenticated encryption for persistent storage.
- Integrate linters or security scanners that can recognize insecure crypto usage patterns in code repositories.
- Runtime and operational checks:
- Periodically review stored encrypted blobs to see if deterministic patterns emerge for identical or similar records, which can indicate improper IV usage.
- Incorporate cryptographic design reviews as part of release checklists for applications handling sensitive configuration data.

