Back

Bypass WhatsApp 3 pins limit

Race Condition bug in Android version of WhatsApp allows me bypass the 3 pinned chats limit.

#fun

A few days ago I woke up at 3 am and felt too lazy to leave my bed and take the few steps to reach my PC so I decided to play around with my phone instead, while replying to a text from a friend I mistakenly archived one of my pinned chats -was not fully awake- and that's when I noticed the undo popup button at the bottom of the screen, tapping it within the 5 seconds which it pops up undoes the archive function and surprisingly the now unarchived chat remains pinned. I decided to test for a race condition bug.

A race condition is a condition of a program where its behavior depends on relative timing or interleaving of multiple threads or processes, changing the timing of the program causes unintended results. At its most basic explanation, it's anything that assumes that two things not in the same thread or process will happen in a particular order, without taking steps to ensure that they do.

The steps for the pin-limit bug are easy to reproduce:

  1. Select all pinned chats and archive

  2. Select a new chat and pin

  3. Tap the Undo button at the bottom of the screen to unarchive the previously pinned chats

  4. Repeat to increase the number of pinned chats

The undo button popup only lasts for 5 seconds so steps 2 and 3 have to be carried out within that time range.

Here's a gif showing it, my phone's visual feedback has been switched on to show where I tap.

This bug was tested on WhatsApp Android version 2.21.19.21.