CVE-2024-33901
Executive Summary
CVE-2024-33901 describes a memory disclosure vulnerability in KeePassXC version 2.7.7. An attacker with the same privileges as the victim (i.e., local access to the process memory) can recover passwords stored in a .kdbx database by analyzing a memory dump of the KeePassXC process. The vendor disputes this finding, stating that memory-management constraints make this unavoidable in the current and other realistic designs. The vulnerability is not remotely exploitable and requires local access to the target system. No official patch is expected.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects KeePassXC, a desktop application distributed via official binaries, package managers (e.g., APT, Homebrew), and source code. There is no NPM, PyPI, Go, or Ruby package involved. Users should verify the integrity of downloaded binaries using GPG signatures or checksums provided by the KeePassXC team.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD assigned, likely due to vendor dispute)
- Attack Vector (AV): Local (L)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): Low (L) – attacker needs same user privileges
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): High (H)
- Integrity (I): None (N)
- Availability (A): None (N)
Threat Level: Medium (local exploitation only, but high impact on confidentiality)
Deep Dive & Mechanics
KeePassXC stores passwords in an encrypted .kdbx database. When the database is unlocked, the master key and decrypted passwords reside in the process memory. The vulnerability arises because KeePassXC does not explicitly zero out memory buffers containing sensitive data after use. An attacker with local access can:
- Identify the KeePassXC process (e.g.,
keepassxc). - Dump its memory using tools like
gcore,procdump, or/proc/[pid]/mem. - Search the dump for known patterns (e.g., password fields, database entries).
The vendor argues that modern memory management (e.g., swapping, core dumps, memory deduplication) makes it impossible to guarantee that sensitive data is never written to disk or accessible to other processes. However, best practices (e.g., using mlock() and memset() with volatile pointers) can reduce the window of exposure.
Vulnerable vs. Patched Code
Vulnerable Code (KeePassXC 2.7.7):
// Example: PasswordEntry.cpp
void PasswordEntry::setPassword(const QString& password) {
m_password = password; // Stored in QString, not explicitly cleared
}
Patched Code (Hypothetical):
// Example: PasswordEntry.cpp
#include <cstring>
#include <sys/mman.h>
void PasswordEntry::setPassword(const QString& password) {
// Use secure memory allocation
char* secureBuf = static_cast<char*>(mmap(nullptr, password.size() + 1,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_LOCKED, -1, 0));
if (secureBuf == MAP_FAILED) {
// Fallback to normal allocation
m_password = password;
return;
}
strncpy(secureBuf, password.toUtf8().constData(), password.size());
// ... use secureBuf ...
// Explicitly zero and unmap
volatile char* p = secureBuf;
while (*p) *p++ = 0;
munmap(secureBuf, password.size() + 1);
}
Note: The vendor has not released a patch. The above is a conceptual fix.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access to the victim's machine (same user or root).
- Victim has KeePassXC running with an unlocked database.
Steps:
- Identify the PID of KeePassXC:
ps aux | grep keepassxc - Dump the process memory:
Or usingsudo gcore <PID> -o keepassxc_dump/proc:sudo cat /proc/<PID>/mem > keepassxc_mem.bin - Search for password patterns:
strings keepassxc_dump.<PID> | grep -E '^[A-Za-z0-9!@#$%^&*()_+=-]{8,}$' | head -20 - Use a tool like
volatilityto analyze the dump for KeePassXC-specific structures.
Expected Outcome: Recovery of plaintext passwords from the memory dump.
Blue Team
Detection:
- Monitor for unusual
gcore,procdump, or direct memory access to KeePassXC processes. - Enable process auditing (e.g.,
auditdon Linux) to log access to/proc/<PID>/mem. - Use endpoint detection and response (EDR) to alert on memory dumping tools.
Mitigation:
- Ensure KeePassXC is always locked when not in use.
- Use full disk encryption (FDE) to protect memory dumps written to swap.
- Disable core dumps for KeePassXC:
echo "keepassxc hard core 0" > /etc/security/limits.d/keepassxc.conf - Run KeePassXC in a sandboxed environment (e.g., Firejail, Docker with limited memory access).
Indicators of Compromise (IOCs)
- Process Names:
gcore,procdump,dd(if used on/proc/<PID>/mem) - File Artifacts:
keepassxc_dump.*,keepassxc_mem.bin - System Calls:
ptrace,process_vm_readv,openon/proc/<PID>/mem - Network: None (local exploitation only)
Detection Engineering
YARA Rule
rule CVE_2024_33901_KeePassXC_Memory_Dump {
meta:
description = "Detects memory dumps containing KeePassXC password data"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-33901"
strings:
$kdbx_header = "KDBX" ascii wide nocase
$password_field = "Password" ascii wide nocase
$uuid_field = "UUID" ascii wide nocase
condition:
$kdbx_header and ($password_field or $uuid_field)
}
Sigma Rule
title: Memory Dump of KeePassXC Process
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to dump the memory of KeePassXC process
author: Valters IT
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith:
- '/gcore'
- '/procdump'
- '/dd'
CommandLine|contains:
- 'keepassxc'
condition: selection
falsepositives:
- Legitimate debugging by authorized personnel
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2024-33901 KeePassXC Memory Dump Attempt"; flow:to_server; content:"keepassxc"; nocase; content:"gcore"; distance:0; within:100; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Lock the KeePassXC database when not actively using it.
- Disable core dumps for KeePassXC (see Blue Team section).
- Use a memory-safe password manager alternative if local memory attacks are a concern.
Long-Term:
- Monitor for updates from KeePassXC (though vendor disputes this issue).
- Implement memory scrubbing in custom password management solutions.
- Educate users about physical and local access security.
Vendor Statement: The vendor considers this an inherent limitation of current memory management and does not plan to release a patch.
Valters IT
DevSecOps & Cyber Threat Intelligence