CVE-2024-21668
JSON

4.4medium

Insertion of Sensitive Information into Log File in react-native-mmkv

Severity
4.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.38% (higher than 34% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4jh3-6jhv-2mgp

Description

react-native-mmkv is a library that allows easy use of MMKV inside React Native applications. Before version 2.11.0, the react-native-mmkv logged the optional encryption key for the MMKV database into the Android system log. The key can be obtained by anyone with access to the Android Debugging Bridge (ADB) if it is enabled in the phone settings. This bug is not present on iOS devices. By logging the encryption secret to the system logs, attackers can trivially recover the secret by enabling ADB and undermining an app's thread model. This issue has been patched in version 2.11.0.

Affected

Product or packageVersionsReported by
mrousavy react-native-mmkv< 2.11.0, before 2.11.0CVE List, NVD
react-native-mmkv (npm)before 2.11.0GitHub Advisory Database

All scores

GitHub_M4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
GitHub4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
NVD4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-532

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

react-native-mmkv is a library that allows easy use of MMKV inside React Native applications. Before version 2.11.0, the react-native-mmkv logged the optional encryption key for the MMKV database into the Android system log. The key can be obtained by anyone with access to the Android Debugging Bridge (ADB) if it is enabled in the phone settings. This bug is not present on iOS devices. By logging the encryption secret to the system logs, attackers can trivially recover the secret by enabling ADB and undermining an app's thread model. This issue has been patched in version 2.11.0.

GitHub Advisory Database

Summary

Before version v2.11.0, the react-native-mmkv logged the optional encryption key for the MMKV database into the Android system log. The key can be obtained by anyone with access to the Android Debugging Bridge (ADB) if it is enabled in the phone settings. This bug is not present on iOS devices.

Details

The bridge for communicating between JS code and native code on Android logs the encryption key. This was fixed in commit a8995cc by only logging whether encryption is used.

Impact

The encryption of an MMKV database protects data from higher privilege processes on the phone that can access the app storage. Additionally, if data in the app's storage is encrypted, it is also encrypted in potential backups. By logging the encryption secret to the system logs, attackers can trivially recover the secret by enabling ADB and undermining an app's thread model.

The bug was discovered and fixed by somebody else. Not me. I'm just reporting this so users of react-native-mmkv upgrade the dependency.

NVD (es)

react-native-mmkv es una librería que permite el uso sencillo de MMKV dentro de aplicaciones React Native. Antes de la versión 2.11.0, react-native-mmkv registraba la clave de cifrado opcional para la base de datos MMKV en el registro del sistema Android. Cualquier persona con acceso al Android Debugging Bridge (ADB) puede obtener la clave si está habilitado en la configuración del teléfono. Este error no está presente en dispositivos iOS. Al registrar el secreto de cifrado en los registros del sistema, los atacantes pueden recuperar trivialmente el secreto habilitando ADB y socavando el modelo de subprocesos de una aplicación. Este problema se solucionó en la versión 2.11.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21668 changed 2025-06-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-4jh3-6jhv-2mgp changed 2026-09-10CC-BY-4.0
NVDCVE-2024-21668 changed 2026-06-17Public domain