Vote 2020 graphic
Everything you need to know about and expect during
the most important election of our lifetimes

A Bug in the iOS Camera App's QR Code Reader Could Send iPhone Users to Malicious Websites

An iPhone user scans a QR code in Wuhan, China, in March 2017.
An iPhone user scans a QR code in Wuhan, China, in March 2017.
Photo: Getty Images

A vulnerability in the way iOS’ camera app handles QR codes could potentially result in users being unknowingly redirected to malicious destinations.


Per 9to5Mac, security researcher Roman Mueller of Infosec recently discovered that a flaw in the camera app’s automatic QR code scanning function could result in it displaying a link and then sending users somewhere else if they click it. Mueller provided an example of the bug in question in which an iPhone-scanned QR code displays a link to via the Safari browser, but actually sends users to his own site:

If you scan [the QR code below] with the iOS (11.2.1) camera app, it will show this notification:

Open “” in Safari

But if you tap it to open the site, it will instead open


Mueller tweeted a gif of what this looks like in practice:

To achieve this result, all that’s needed is to have the QR code embed a link in this format:


Mueller offered this explanation for why the trick works:

The URL parser of the camera app has a problem here detecting the hostname in this URL in the same way as Safari does.

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


Any user who scanned the code would see a prompt that they’re about to go to Facebook, and instead end up on the Infosec website. It’s not hard to imagine how this could be used to redirect users to scam websites or malware. Malicious QR codes might not seem to be at the top of the list when it comes to security vulnerabilities, especially since they can already be used to trick users into clicking on redirects using a URL-redirecting service like Bitly. But anyone can easily create such a code and then spread it either physically or via any website that allows image hosting, which is pretty much all of them, and this trick can fool users into thinking they’re going to a legitimate site even if they’re wary enough not to click on a Bitly link.

According to Mueller, he notified Apple of the bug on December 23rd, 2017, and the bug was still not patched as of March 24th, 2018, a few days after the latest iOS update. In any case, until this bug is fixed iPhone users may want to be even more judicious than normal when clicking on QR codes, especially since jerks tend to jump on iOS bugs like the infamous Telugu bug to wreak havoc as soon as they’re identified. ZDNet reports iOS 11.3 may arrive as soon as Tuesday, so it’s possible this exploit could be killed off in the very near future.



"... An upperclassman who had been researching terrorist groups online." - Washington Post

Share This Story

Get our newsletter


I keep wondering why/how QR codes are still “a thing.”