Photo Credit: Indiatimes

San Francisco: Your Whatsapp online status can help hackers figure out who you are talking to and when you go to sleep owing to a flaw in the micro-blogging platform, a software engineer has claimed.

After discovering the flaw in WhatsApp, Rob Heaton -- who has made similar security-related findings in the past -- exploited the flaw by creating a Chrome extension with a minimal four lines of code, Digital Trends reported late on Tuesday.

"What that means is that when you go offline and then come back online to read a message, that action is being logged.

"Those online and offline actions from both participants in the conversation can then be correlated to identify when two people are messaging each other," the report added.

Heaton warned that this data can be easily collected on a mass level and then sold to third-party firms for advertising purposes.

"People with irregular sleeping patterns are, after all, excellent customers to sleeping pills manufacturers," The Next Web reported.

The code could even be tweaked to correlate more than two people messaging each other.

Heaton was able to identify when users were going to sleep by seeing their first and last "online" statuses for the day.

According to reports, users actually can do nothing to prevent hackers from being able to spy on them, unless WhatsApp security researchers find a way out.

"Using WhatsApp, you can set the app to show your 'last seen' statuses to either everyone, only contacts, or no one, but no such feature exists for your online status," the report said.