CVE-2024-21668
JavaScript vulnerability analysis and mitigation

Overview

react-native-mmkv, a library for using MMKV in React Native applications, contained a security vulnerability (CVE-2024-21668) where versions prior to 2.11.0 logged the optional encryption key for the MMKV database into the Android system log. This vulnerability was discovered and disclosed on January 9, 2024, affecting all versions of react-native-mmkv before 2.11.0 on Android devices, while iOS devices were not impacted (NVD).

Technical details

The vulnerability stems from the improper handling of sensitive information, specifically the encryption key used for the MMKV database. The issue was classified as CWE-532 (Insertion of Sensitive Information into Log File). The vulnerability received a CVSS v3.1 score of 4.9 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N, indicating high confidentiality impact but no impact on integrity or availability (NVD).

Impact

The vulnerability exposes the encryption key to anyone with access to the Android Debugging Bridge (ADB) if it is enabled in the phone settings. By logging the encryption secret to the system logs, attackers can trivially recover the secret by enabling ADB, potentially undermining an app's thread model and compromising the security of the encrypted MMKV database (NVD).

Mitigation and workarounds

The vulnerability has been patched in version 2.11.0 of react-native-mmkv. Users are advised to upgrade to this version or later to address the security issue. The fix involves removing the logging of encryption keys in the Android system logs (GitHub Patch, GitHub Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management