O2 UK's Weird MSISDN Lookup API
It's always fun keeping your network inspector tab open. While looking around the O2 UK website, I found this page all about eSIMs. For some reason, it wants to know the user's phone number.
I put in a random number, and it refused to let me in.

Putting in a genuine O2 number let me through. So what is it doing to validate numbers?
It is making an API call to this URl:
https://www.o2.co.uk/o/customer/mods/lookup/447700900123
After a bit of testing, this is how I think it works.
If you give it an O2 phone number, it replies with:
JSON
{"type":"ONE"}
If you give it a number which isn't on O2, it gives:
JSON
{"type":"ZERO"}
A number it doesn't recognise gives:
JSON
{"message":"Unable to find the requested resource."}
A malformed or incomplete phone number gives:
JSON
{"message":"Something's wrong. Please try again later."}
Responsible Disclosure?
As far as I can tell, O2 no longer have a Bug Bounty or Responsible Disclosure offering. So I'm publishing it here to let people know.
It is possible that someone could use this API to disclose a (minor) piece of personal information about you - namely whether your phone number is on O2 or not. I don't think that's particularly sensitive, but it is probably worth knowing.
Mike says:
https://www.telecom-tariffs.co.uk/codelook.htm tells me the network my number was allocated to, (as can other websites, it is apparently public via Ofcom but I’ve not looked for the source), but I’ve ported it since. That website also gives me charging information which is different to the network the number was allocated to, but also wrong in a way which makes me wonder if it’s wrong because it has out of date information or for some other reason.
Reply to original comment on mas.to
|Reply to original comment on mas.to
|Reply to original comment on mastodon.energy
|My number is registered to Virgin Media and it'll show up as an O2 number
Welcome to FreeCarrierLookup.com
Reply to original comment on lethallava.land
|Reply to original comment on cathode.church
|Mike says:
More comments on Mastodon.