<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Azan Shahid on Medium]]></title>
        <description><![CDATA[Stories by Azan Shahid on Medium]]></description>
        <link>https://medium.com/@azan.shahid?source=rss-f300811653b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Azan Shahid on Medium</title>
            <link>https://medium.com/@azan.shahid?source=rss-f300811653b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:47:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azan.shahid/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[WhatsApp Locked Chats Vulnerabilities]]></title>
            <link>https://medium.com/@azan.shahid/whatsapp-locked-chats-vulnerabilities-50b3003c972d?source=rss-f300811653b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/50b3003c972d</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[locked-chats]]></category>
            <dc:creator><![CDATA[Azan Shahid]]></dc:creator>
            <pubDate>Tue, 30 Dec 2025 10:00:27 GMT</pubDate>
            <atom:updated>2026-04-04T09:42:48.531Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi,</p><p>I recently discovered some vulnerabilities in WhatsApp Desktop, though a few also affect other versions.</p><p>Meta rejected all the vulnerabilities, though I think these vulnerabilities impact the security of the WhatsApp Locked Chat feature. Now that they have shifted from UWP(Universal Windows Platform) to WebView wrapper, the main vulnerability has been patched. The other two are still not patched.</p><h3>WhatsApp Locked Chat Password Recovery</h3><p>WhatsApp stores the plaintext password in memory if as long as the WhatsApp session is running, in which password was submitted even after the user switches to normal chats, once the locked chats are unlocked.</p><p>Someone might ask: <em>if the password isn’t in memory, how would WhatsApp decrypt locked chats?</em></p><p>In practice, if the password must remain in memory, it should be in memory as long as locked chats are open. Once, user shifts to normal chat from locked chats, the password should be removed from the memory.</p><h4>Impact</h4><ol><li>An attacker can view locked chat messages on any device they want. He only has to exploit this vulnerability once to get the password.</li><li>If he has access to the victim’s mobile, he can change the password as well.<br>In this case, the victim will have no way to recover their locked chats once the attacker has changed the password.</li></ol><h4>Discussion with Meta</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*5ctCaMkXkykUHTIx8EZsYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*SB00ie4_1zV9cxNfGldn8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*SD0ejJ_WBe1AFM20hly1VA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*O58o35X8fCgS21s-BmEx0g.png" /></figure><h4>Fix</h4><ol><li>Do not use plaintext passwords for encryption and decryption. (See the next vulnerability, where I show that locked messages are treated as normal messages by WhatsApp and passcode protection is just UI.). If possible, use a hash version for encryption and decryption. This way attacker has to do work to get the correct plaintext password. It does not affect encryption and decryption if a hashed password is used, but it will make it difficult for an attacker to get the plaintext password from memory.</li><li>Remove plaintext password from memory as soon as the user switches to normal chats from locked chats.</li></ol><h3>WhatsApp Locked Chats Recovery</h3><p>It was also possible to recover the locked chats themselves</p><p>WhatsApp Locked Chats are also treated as normal chats without any encryption. The old version of WhatsApp desktop was UWP (Universal Windows Platform). After knowing of this vulnerability, now they have shifted to Chrome WebView-based Wrapper.</p><p>When we link our WhatsApp on desktop or browser, WhatsApp fetches all chats from the device as plaintext (data itself is encrypted, but then it is decrypted on the desktop as plaintext). Locked Chats are also in plaintext as normal chats. These are then encrypted and stored in the database(in case of a desktop). In the browser, I think they are just cached. I am not sure about the working of the browser version.</p><p>An attacker can recover the locked chats by just making a memory dump of WhatsApp desktop or the browser tab (in case WhatsApp Web is being used). Decrypted locked chats are present in memory as plaintext.</p><p>From my analysis, WhatsApp Desktop, when newly linked, doesn’t load lock chats into memory but directly writes them to the database and removes them from memory. Now, they won’t be present in memory. Once the user opens the locked chats even once on that device via passcode, chats will be present in memory even across a reboot. It somehow needs the password one time to load them in memory. Once loaded, you never need a password to view locked chats in the memory dump.</p><p>For the Desktop version, we can decrypt the database itself and see chats there even if locked chats were never opened on the desktop.</p><p>Decryption of WhatsApp Desktop is left as an exercise for the reader.</p><p>Then, the meta team asked if I was able to differentiate between normal chat and locked chats from the database.</p><p>I wrote the following script to differentiate between normal and locked chats. This script will print names of locked chats and groups.</p><pre># https://stackoverflow.com/questions/54289555/how-do-i-execute-an-sqlite-script-from-within-python<br># https://www.geeksforgeeks.org/python/python-sqlite-select-data-from-table/<br><br>import sqlite3<br><br>#you have to decrypt messages.db first<br>db = sqlite3.connect(&#39;messages.db&#39;)<br><br>cursor = db.cursor()<br><br>cursor.execute(&quot;SELECT JiD, GroupSubject, flags FROM Conversations&quot;)<br><br>result = cursor.fetchall()<br><br>for row in result:<br>    jid, group_name, flags = row<br>    if flags &amp; (1&lt;&lt;18):<br>        print(f&quot;{jid:&lt;30} {group_name if group_name else &#39;&#39;}&quot;)</pre><p>This will print phone numbers and group names present in locked chats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*joWDzc0CIn3av-ac4-e7sQ.png" /></figure><p>You can see phone numbers of participants in locked chats. If it is a group, you will get the group ID and group name.</p><p>It is then trivial to read text in groups and chats via the database or by taking a memory dump to get new messages that have not been written to the database yet.</p><p>Meta team told that the WhatsApp Locked Chats feature was just UI based (see screenshots below), but this was never mentioned in the locked chats feature <a href="https://blog.whatsapp.com/chat-lock-making-your-most-intimate-conversations-even-more-private">online documentation</a>.</p><blockquote>We think this feature will be great for people who have reason to share their phones from time to time with a family member or those moments where someone else is holding your phone at the exact moment an extra special chat arrives. You can lock a chat by tapping the name of a one-to-one or group and selecting the lock option. To reveal these chats, slowly pull down on your inbox and enter your phone password or biometric.</blockquote><h4>Discussion with Meta</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*dxyUqgGxlI5llGqyTb1MFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*NaqkvpduV4APjlHnHWtM9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*mzypX5B1f9vUfhXBvNNqpQ.png" /></figure><p>After reopening the report, I got the following report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*SrY4xYZinbv7Z78e57ME6g.png" /></figure><p>In this report, I also mention about previous locked chat passcode recovery vulnerability as well. That’s why they talked about both scenarios.</p><h3>Send Messages to Locked Chats</h3><p>It was also possible to send messages to locked chats by just forwarding the message. If you don’t want to forward, you can also add a text-based status with visibility set to None. Now, forward this status to the locked chat. When asked for a fingerprint, close the prompt without entering a fingerprint or password. The message will still be sent in the background without you ever entering a fingerprint or password.</p><p>The issue with forwarding is that sometimes it adds a “forwarded” tag, so it’s better to use the status method.</p><h4>Discussion with Meta</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*jBanM3sl8XjNiBHbAvooVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*tyCwJAlig7BdkG3p9ziH-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*C4eXfMfxOJnh4RNZjfCjkg.png" /></figure><h3>Complete Discussions with Meta</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2INKDA9L1yk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2INKDA9L1yk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2INKDA9L1yk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb8e54676534d957d02c327877683022/href">https://medium.com/media/fb8e54676534d957d02c327877683022/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50b3003c972d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>