An iOS QR code reader vulnerability could lead you to malicious websites

If you regularly use your phone to scan QR codes, be careful — you may not be headed to the site you think you are.

iOS 11 brought us many wonderful features, including the ability to read QR codes using the iPhone's native camera app instead of a third-party QR code reader. Unfortunately, according to a report by Infosec, there is a vulnerability in the iOS camera's reader that is pretty easily exploited, taking you to a malicious website without your knowledge.

Basically, when you scan a code that's meant to lead you to a certain site, the site's URL will appear in a pop-up that you need to tap in order to visit the page displayed. However, Infosec found that if you embed a URL in a QR code in a certain format, you can essentially fool the reader, causing it to display one URL but take you to another one entirely. By inputting the "fake" URL and actual URL into the QR code like this ...


... individuals can exploit the vulnerability and — in this particular case — make the user believe that they're headed to Facebook when in reality, they're headed to the Infosec website.

The article hypothesizes that this occurs because the hostname is able to slide under the radar of the URL parser of the camera app in a way it isn't able to in Safari:

It probably detects "xxx\" as the username to be sent to "". While Safari might take the complete string "xxx\" as a username and "443" as the password to be sent to This leads to a different hostname being displayed in the notification compared to what actually is opened in Safari.

Apparently, Infosec made Apple aware of this vulnerability in December of last year, but the company has yet to provide any sort of fix or response.

If you want to (safely) try it for yourself, you can scan Infosec's QR code below.


Have you encountered this exploit while scanning a QR code? Share in the comments below.

Tory Foulk

Tory Foulk is a writer at Mobile Nations. She lives at the intersection of technology and sorcery and enjoys radio, bees, and houses in small towns. When she isn't working on articles, you'll likely find her listening to her favorite podcasts in a carefully curated blanket nest. You can follow her on Twitter at @tsfoulk.