Subscribe to typing notifications for any Instagram user
The Instagram realtime messaging service accepted a subscription request for typing notifications on behalf of any user, because the subscription's user identifier was taken from the client rather than checked against the authenticated account. An attacker could therefore watch when a chosen target was typing in a direct message thread, without being a participant in that conversation.
Published on philippeharewood.com
Instagram subscribes to typing notifications for Instagram direct messages via the MQTT protocol. It is possible to subscribe to these messages as any user.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the realtime subscription handler trusted a client-supplied user identifier and never verified that the authenticated session belonged to that user.
Impact
This could have let a malicious user subscribe to typing notifications for a target Instagram user, revealing when that person was typing in a direct message thread.
What the attacker needed
An Instagram account (unofficial API); target's numeric user ID; bypass of the security challenge
The fix
Facebook confirmed a patch two days after the report, so the server presumably began checking that the subscription's user identifier matched the authenticated account.
How it was found
- Find the target's numeric Instagram user ID from the public profile page source.
- Edit the library's direct typing subscription so the user identifier is the target's ID instead of the logged-in account's.
- Run the realtime client example with the attacker's credentials.
- Have a third account type in a thread with the target without sending the message.
- Observe the subscription response showing the typing activity and its sender.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Instagram sends small live updates over a messaging channel so your phone can show things like 'typing…' in a chat. The server trusted the account identifier the app sent when asking for those updates, instead of checking it belonged to the person asking. That meant someone could ask to receive another person's typing updates and the server would happily send them.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.