Security

KeePass fixed the bug that allows the extraction of the cleartext master password

KeePass addressed the CVE-2023-32784 bug that allows the extraction of the cleartext master password from the memory of the client.

KeePass has addressed the CVE-2023-32784 vulnerability, which allowed the retrieval of the clear-text master password from the client’s memory.

KeePass is a free and open-source software used to securely manage passwords. It functions as a digital “safe” where users can store and organize their sensitive information, including passwords, credit card numbers, notes, and other sensitive information. KeePass encrypts the data using a master key or master password that you need to provide in order to access the stored information.

The company fixed the bug with the release of KeePass version 2.54.

In mid-May, security researcher Vdohney released a PoC tool called KeePass 2.X Master Password Dumper that allows retrieving the master password for KeePass.

The expert explained that the tool exploits the unpatched CVE-2023-32784 flaw to retrieve the master password from the memory of KeePass 2.x versions.

The problem stems from the use of a custom-developed text box (‘SecureTextBoxEx’) for password entry in the KeePass 2.X. This text box is not only used for the master password entry, but in other places in KeePass as well, like password edit boxes allowing an attacker to use it to recover their contents.

For every character typed, a leftover string is created in memory.

“Because of how .NET works, it is nearly impossible to get rid of it once it gets created. For example, when “Password” is typed, it will result in these leftover strings: •a, ••s, •••s, ••••w, •••••o, ••••••r, •••••••d.” “The POC application searches the dump for these patterns and offers a likely password character for each position in the password.” reads the post published by the Vdohney.

The success of the attack depends on how the password was typed and how many passwords were typed per session. The expert explained that even if there are multiple passwords per session or typos, the way .NET CLR allocates these strings means that they are likely to be nicely ordered in memory. For example, if the user typed three different passwords, the attacker is likely to get three candidates for each character position in that order, allowing to recover all three passwords.

The researchers pointed out that the password can be retrieved only when it has been typed on a keyboard, not copied from a clipboard. 

The most recent release of the popular password manager utilizes a Windows API to handle data from text boxes, effectively preventing the creation of managed strings that could be extracted from memory.

Users that cannot upgrade their installs are recommended to:

  • Change the master password
  • Delete hibernation file
  • Delete pagefile/swapfile
  • Overwrite deleted data on the HDD to prevent carving (e.g. Cipher with /w on Windows)
  • Restart the computer

Or just overwrite their HDD and do a fresh install of the OS.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, KeePass)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

TeamViewer fixed a vulnerability in Windows client and host applications

TeamViewer has patched a high-severity privilege escalation vulnerability affecting its Windows client and host applications.…

3 hours ago

Operation Talent: An international law enforcement operation seized Cracked, Nulled and other cybercrime websites

An international law enforcement operation targeted several major cybercrime websites, including Cracked, Nulled, Sellix, and…

4 hours ago

PHP package Voyager flaws expose to one-click RCE exploits

The open-source PHP package Voyager is affected by three vulnerabilities that could be exploited to achieve one-click…

6 hours ago

Italy’s Data Protection Authority Garante requested information from Deepseek

Italy’s data privacy regulator Garante has requested information from Chinese AI company DeepSeek regarding its…

10 hours ago

U.S. CISA adds Apple products’ flaw to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds Apple products' flaw to its Known Exploited…

22 hours ago

Aquabot variant v3 targets Mitel SIP phones

A new variant of the Mirai-based botnet Aquabot targets vulnerable Mitel SIP phones to recruit…

23 hours ago

This website uses cookies.