Summary
Mercusys AC12G (EU) V1 routers encrypt configuration backup files with a hardcoded DES key using single DES in ECB mode, making the encryption effectively reversible by any attacker who knows or can discover the key.
An attacker who obtains a backup file can decrypt it to recover all stored credentials, including the router's admin password, Wi-Fi pre-shared key, and DDNS account details.
Affected context
This vulnerability affects Mercusys AC12G (EU) V1 routers running firmware AC12G(EU)_V1_200909 that allow users to export configuration backups.
The issue arises specifically in the backup/export mechanism where device configuration, including sensitive credentials, is "encrypted" using a static, hardcoded DES key in ECB mode instead of a user-specific or device-unique key.
It becomes a concern when configuration backup files are stored on user systems, shared, or intercepted over the network, as anyone who has the backup file and knows the key can decrypt and read all embedded secrets.
Exploit preconditions
- Attack surface: Offline analysis of configuration backup files created by the router.
- Required access: Ability to obtain a configuration backup file (e.g., from a compromised PC, shared storage, intercepted download/upload, or physical access to a user's backup).
- Trigger point: Decryption of the backup file using the known hardcoded DES key and ECB mode, which does not depend on any per-user secret.
- Why exploitation is possible: The encryption design uses a globally hardcoded DES key and insecure ECB mode, so any attacker who knows or recovers this key can decrypt any backup from any device, exposing all stored credentials.
Why this happens
The core issue is the use of a hardcoded cryptographic key inside the firmware to protect sensitive configuration backups, mapping to CWE-798: Use of Hard-coded Credentials and related cryptographic misconfiguration.
Instead of deriving an encryption key from user-specific or device-unique secrets, the product relies on a static DES key known to the firmware and reusable across devices.
Because this key is identical for all backups, once recovered it permanently undermines confidentiality for all exported configurations.
The choice of single DES in ECB mode further weakens security, as DES is considered obsolete and ECB mode leaks structural patterns and lacks semantic security, making the protected data vulnerable to straightforward decryption or pattern-based analysis.
Potential impact
- Disclosure of the router's administrator password, allowing full control over device settings.
- Recovery of Wi-Fi pre-shared keys (PSK), enabling unauthorized access to the wireless network.
- Exposure of DDNS credentials, potentially compromising external DNS services or other linked accounts.
- Facilitation of network reconnaissance and further lateral movement within the local network once access is gained.
- Use of recovered credentials in broader credential-stuffing or targeted attacks against associated user accounts.
General mitigation guidance
Effective mitigation focuses on reducing the exposure of backup files and improving how secrets are protected in configuration storage.
From a design perspective, safer patterns include:
- Deriving encryption keys from user-specific secrets (e.g., admin password) or device-unique keys stored in secure hardware or protected storage, instead of using a hardcoded global key.
- Replacing legacy DES with modern, industry-standard authenticated encryption algorithms that provide confidentiality and integrity (e.g., AES with an authenticated mode).
- Ensuring backups either minimize the inclusion of plaintext or directly recoverable secrets or store them in a form that remains protected even if the backup is obtained.
- Implementing clear separation between configuration data and security credentials so that backups can be exported without embedding high-value secrets where feasible.
- Encouraging operational practices that treat backups as sensitive assets (e.g., restricted access, encrypted storage at rest, and secure sharing channels).
How teams detect issues like this
Identifying this class of issue typically involves:
- Firmware and binary analysis: Reviewing router firmware or backup utilities for static cryptographic keys, repeated key patterns, or embedded DES/AES keys in code or data sections.
- Configuration backup inspection: Capturing backup files and testing whether the same key applies across devices or whether patterns consistent with ECB mode appear in the ciphertext.
- Static analysis rules: Using pattern-based scanning for cryptographic APIs with hardcoded key material, deprecated ciphers (such as DES), and insecure modes (like ECB).
- Security code review: Examining configuration export/import code paths for assumptions about key management, secret derivation, and how credentials are serialized into backups.
- Policy enforcement: Establishing internal development policies that prohibit hardcoded cryptographic keys and mandate key rotation, per-device uniqueness, and modern cipher suites.

