2015-04-13

Plain web text offenders: sending my location over HTTP when HTTPS was possible

The BBC Weather App sends the location of the user via HTTP to the BBC in order to determine the best location for weather information. It does this with roughly 100m accuracy, in the parameters of an unencrypted GET and even though the same API endpoint is available using HTTPS.

I discovered this accidentally using Charles Proxy to snoop on traffic from my iPhone at home. Here's the Charles Proxy view of that app interacting with the BBC's APIs:


It's hitting the endpoint http://open.live.bbc.co.uk/locator/locations with parameters la and lo containing the three decimal digit latitude and longitude (which give roughly 100m precision) over HTTP as a GET request.

The API then returns a JSON object containing nearby locations that the app can get weather information about.

Sadly, this API could have been accessed over HTTPS. Just switching the protocol from HTTP to HTTPS works fine. A legitimate wildcard certificate for *.bbc.co.uk is used.


So, the app could have used HTTPS.

Perhaps "This app would like to use HTTP for its API" should be a permission that the user has to explicitly give.

8 comments:

Sebastian Cato said...

> A legitimate wildcard certificate for *.bbc.co.uk is used.

Minor nitpick: *.bbc.co.uk is not valid for open.live.bbc.co.uk. The certificate is valid because it has a SAN for *.live.bbc.co.uk.

wildcards do not apply to subdomains.

Marcos Mayorga said...

I strongly disagree with you.

Whoever holding a resource in a server publishing it thought HTTP should consider offering it *secure* or *not* considering factors like:
* is it public?,
* does it compromise any security? is it something that anonymous people are allowed to see?

Going HTTPS for everything will cost the planet more energy since encryption costs CPU power, that's heat, and certainly, why would you want to cypher resources like the twitter logo?

Chris said...

"why would you want to cypher resources like the twitter logo?" - Maybe because you're somewhere that bans Twitter?

Craig said...

Rather than a prompt, auto-denying for the location API when not HTTPS seems more appropriate. Then a message shown to the user to shame the site.

Ken said...

> Maybe because you're somewhere that bans Twitter?

That's when you use an HTTPS proxy

Unknown said...

I'd be interested to know how much energy the cryptography at each end uses compared to the energy required to power all the routers and connections along the way for the slice of traffic.

Jon Leigh said...

As it's an http get, your location coordinates are sent in the url meaning they would be visible no matter if the connection is secure or not. Https only encrypts the contents of http post parameters and the response.

John Graham-Cumming said...

@Jon Leigh: you are not right about that. HTTPS encrypts the entire HTTP request which includes the URI.