The Reolink application uses the AES-CFB algorithm to encrypt configuration files and other sensitive data.
However, the Initialization Vector(IV) used in this process is handled improperly, leading to a vulnerability where encrypted configuration data can be easily decrypted by an attacker.
This issue corresponds to CWE-1204: Generation of Weak Initialization Vector.
The following code shows that the IV is generated dynamically at runtime:
{
key: "fetchAesIv",
value: function () {
return window.napiDecrypt.getAesIv();
},
}
However, the value returned is always the same string: bcswebapp1234567
.
This means that although the IV is technically generated at runtime, it is effectively hardcoded, providing no additional security.
While the application is running, the IV value can be retrieved dynamically via the DevTools JavaScript console.
The window.napiDecrypt.getAesIv()
function returns a Promise that resolves to a constant string bcswebapp1234567
.
This demonstrates that the IV is reused across all encryption operations, violating cryptographic best practices.