Inappropriate implementation in Lens (CVE-2024-13983)
Chrome on iOS mishandled URLs containing backslashes when scanning QR codes, displaying a misleading domain in the pop-up and then navigating to a different domain. An attacker could craft a QR code that appears to point to a trusted site but redirects the user to a malicious one.
Originally disclosed on Chrome VRP
- Fix shipped in 5 months
VULNERABILITY DETAILS
We are currently investigating QR code issues across various browsers and have discovered that Chrome on iOS may be susceptible to certain phishing attacks when handling QR codes.
When Chrome scans a QR code on iOS, it attempts to truncate the full URL based on the backslash somehow, trying to display only the SLD in the pop-up. However, when users click the pop-up, Chrome may truncate certain characters in the URL during navigation, potentially redirecting users to a different, misleading website.
VERSION
Chrome Version: 131.0.6778.73
Operating System: iOS 18.1
REPRODUCTION CASE
- Create a QR code which contains
http://msdn.com\\@long.long.evil.com. You can use the first attached picture. - Open chrome on iOS then use the build-in camera to scan this QR code.
- Seeing the second attached picture, user may think it is
msdn.comand it is a safe link. - After clicking the pop-up, user will be directed to
long.long.evil.com.
CREDIT INFORMATION Reporter credit: Zeddy in CUHK
Context
Chrome on iOS includes a built-in QR code scanner, reachable through the camera, that shows a pop-up preview of the scanned link before the user navigates to it. To make that preview readable, Chrome tries to shorten the full URL and display only the second-level domain (SLD) in the pop-up. The idea is that a user glancing at the pop-up sees a short, recognisable domain rather than a long URL.
The researcher was investigating QR code handling across several browsers and found that this shortening behaviour on Chrome for iOS can be abused for phishing. The affected component is Lens, and the issue is classed as an inappropriate implementation.
Setup
The testing was done with:
| Item | Value |
|---|---|
| Chrome version | 131.0.6778.73 |
| Operating system | iOS 18.1 |
| Entry point | Chrome's built-in camera QR scanner |
| Tooling | A QR code generated from a crafted URL |
No account, role or special configuration is needed. The only precondition is a victim who scans an attacker-supplied QR code with Chrome on iOS and then taps the preview pop-up.
Finding it
While looking at how different browsers handle QR codes, the researcher noticed that Chrome on iOS truncates the full URL based on the backslash when building the pop-up, aiming to show only the SLD. The suspicion was that the string used for the preview and the string actually navigated to are not treated the same way, so the pop-up could show one domain while the browser opens another.
That mismatch is what makes the issue interesting: the preview is a trust signal, and if it can be made to display a benign-looking domain while the navigation goes elsewhere, the preview stops being trustworthy.
Exploitation
Step 1: Build the QR code
Create a QR code whose content is the following URL:
http://msdn.com\\@long.long.evil.com
The URL is crafted so that the part before the @ looks like a familiar domain, while the navigation ends up at the host after the @. The backslashes sit between the two and are what Chrome's truncation logic keys on when it decides what to show in the pop-up.
Step 2: Scan it with Chrome on iOS
Open Chrome on iOS and use the built-in camera to scan the QR code. Chrome parses the URL and prepares the preview pop-up.
Step 3: The misleading pop-up
In the pop-up, the user may see what looks like msdn.com and conclude that the link is safe. The truncation based on the backslash is what produces this shortened, benign-looking display.
Step 4: Tap the pop-up
When the user clicks the pop-up, Chrome may truncate certain characters in the URL during navigation. The result is that the user is directed to:
long.long.evil.com
So the domain shown in the preview and the domain actually visited differ. The user believes they are following a link to msdn.com and lands on the attacker's host instead.
Root cause
The preview and the navigation do not apply the same truncation to the URL. The pop-up shortens the URL based on the backslash in order to display only the SLD, while navigation truncates certain characters in the URL, and the two results diverge. Because the displayed string is derived differently from the string that is actually followed, an attacker can craft a URL where the preview shows a trusted-looking domain and the navigation goes to a different host.
The report describes the behaviour but does not include the underlying code, so the exact implementation mistake is not shown.
Impact
The issue is a phishing aid. An attacker who can get a victim to scan a crafted QR code with Chrome on iOS can present a pop-up that appears to point at a legitimate domain, then send the victim to an attacker-controlled site once the pop-up is tapped. The attack requires the victim to scan the QR code and then tap the preview; it does not work without that interaction. The severity is low, and the report does not describe any further consequences beyond the redirect to the misleading site.
Fix
The report does not state what change was made. The behaviour that needs correcting is the divergence between the URL shown in the pop-up and the URL actually navigated to: whatever truncation is applied for display should not produce a string that resolves to a different host than the one the browser will visit.
Variants to test
- Other characters that URL parsers treat specially, such as additional backslashes, mixed forward and backward slashes, or encoded equivalents, placed between a trusted-looking domain and an
@. A positive result is a pop-up that shows the trusted domain while navigation goes to the other host. - Userinfo-style URLs where the trusted domain appears before
@and the real host after it, without backslashes. A positive result is the same display/navigation mismatch. - Long URLs where the truncation logic cuts at a different point than the navigation parser. A positive result is a preview whose visible domain differs from the host actually contacted.
- The same crafted URLs entered directly into the address bar rather than scanned, to see whether the preview path is the only place the mismatch appears.
Hunting notes
This kind of bug hides in features that display a shortened or prettified version of a URL: link previews, QR scanners, chat clients that unfurl links, and any UI that shows a domain to help users judge trust. During recon, look for places where the product renders a domain extracted from a URL rather than the URL itself, and compare what is displayed with what is actually requested when the user acts on it.
The signal is a display routine that parses the URL differently from the navigation routine, especially one that keys on characters like backslashes or @. Testing is cheap: craft URLs that put a trusted domain in the visible position and a different host in the position the parser will actually use, then observe both the preview and the resulting request.
The researcher demonstrated the full path a victim takes: scan the QR code, see the misleading pop-up, tap it, and land on the other host.
Disclosure
The issue was reported through the Chrome VRP by Zeddy in CUHK, rated low severity, with a bounty of 1000.00 USD, and disclosed on 2025-04-29 as CVE-2024-13983.
What happened, in plain words
Chrome on iOS has a built-in QR code scanner. When you point the camera at a QR code, Chrome shows a small pop-up with a preview of the link before you tap it. To make that preview easy to read, Chrome shortens the full web address and shows only the main part of the domain, the part people recognise.
The researcher found that this shortening can be tricked. A specially crafted link can make the pop-up show a familiar, trusted-looking domain, while tapping the pop-up actually takes you to a completely different website controlled by an attacker. That is a phishing trick: the victim thinks they are going somewhere safe and ends up somewhere else.
The affected part of Chrome is called Lens, and the problem is classed as an "inappropriate implementation", which simply means the feature was built in a way that does not behave safely.
Context
Chrome on iOS includes a QR code scanner that you reach through the camera. Before you go to a scanned link, Chrome shows a pop-up preview of it. To keep that preview readable, Chrome tries to shorten the full URL and display only the second-level domain (SLD).
A few terms first:
- URL: the full address of a web page, for example
http://example.com/page. It has several parts: the scheme (http), the host (the domain name), and often a path after it. - Domain: the name of a website, such as
example.com. - Second-level domain (SLD): the main, recognisable part of a domain. In
msdn.comthe recognisable part ismsdn. Inmsdn.comit ismsdn. Showing only the SLD is meant to give the user a short, familiar name to glance at. - Phishing: tricking someone into trusting a link or page that is not what it appears to be, usually to steal information or send them somewhere malicious.
- Lens: the name of the Chrome component involved here.
The researcher was looking at how several browsers handle QR codes and found that this shortening behaviour on Chrome for iOS can be abused for phishing.
Setup
The testing was done with:
| Item | Value |
|---|---|
| Chrome version | 131.0.6778.73 |
| Operating system | iOS 18.1 |
| Entry point | Chrome's built-in camera QR scanner |
| Tooling | A QR code generated from a crafted URL |
A QR code is the square barcode you can scan with a phone camera; it stores text, usually a web address. "Crafted" means the URL was deliberately built to trigger the bug rather than being a normal link.
No account, role or special configuration is needed. The only precondition is a victim who scans an attacker-supplied QR code with Chrome on iOS and then taps the preview pop-up.
Finding it
While looking at how different browsers handle QR codes, the researcher noticed that Chrome on iOS truncates the full URL based on the backslash when building the pop-up, aiming to show only the SLD. "Truncates" means cuts short: Chrome chops the address down to a shorter string for display.
The suspicion was that the string used for the preview and the string actually navigated to are not treated the same way. In other words, the text shown in the pop-up and the address the browser really opens could disagree, so the pop-up could show one domain while the browser opens another.
That mismatch is what makes the issue interesting: the preview is a trust signal. Users rely on it to judge whether a link is safe. If it can be made to display a benign-looking domain while the navigation goes elsewhere, the preview stops being trustworthy.
Exploitation
Step 1: Build the QR code
Create a QR code whose content is the following URL:
http://msdn.com\\@long.long.evil.com
Line by line, in plain words:
http://is the scheme, telling the browser this is a normal web link.msdn.comis a familiar-looking domain placed right after the scheme, so it is the first thing a reader notices.\\are two backslashes. In a URL, a backslash is not a normal separator, but different pieces of software can treat it in different ways, and here it is the character Chrome's shortening logic keys on.@is the at-sign. In URLs, everything before an@can be treated as a username (called "userinfo"), and the part after it is the real host. So a URL parser can read the host aslong.long.evil.com, notmsdn.com.long.long.evil.comis where the user is directed after tapping the pop-up.
The URL is crafted so that the part before the @ looks like a familiar domain, while the actual host is the part after the @. The backslashes sit between the two and are what Chrome's truncation logic keys on when it decides what to show in the pop-up.
Step 2: Scan it with Chrome on iOS
Open Chrome on iOS and use the built-in camera to scan the QR code. Chrome parses the URL and prepares the preview pop-up. This step is how the attacker gets the crafted link in front of the victim without the victim typing anything.
Step 3: The misleading pop-up
In the pop-up, the user may see what looks like msdn.com and conclude that the link is safe. The truncation based on the backslash is what produces this shortened, benign-looking display. "Benign" means harmless-looking.
Step 4: Tap the pop-up
When the user clicks the pop-up, Chrome may truncate certain characters in the URL during navigation. The result is that the user is directed to:
long.long.evil.com
This is the host part only, the address the browser actually goes to. So the domain shown in the preview and the domain actually visited differ. The user believes they are following a link to msdn.com and lands on the attacker's host instead.
Root cause
The preview and the navigation do not apply the same truncation to the URL. The pop-up shortens the URL based on the backslash in order to display only the SLD, while navigation truncates certain characters in the URL, and the two results diverge. Because the displayed string is derived differently from the string that is actually followed, an attacker can craft a URL where the preview shows a trusted-looking domain and the navigation goes to a different host.
A useful comparison: imagine a receptionist who reads only the first word of a visitor's name badge out loud, while the security door checks the whole badge. If the badge is written so the first word says "staff" but the rest says something else, the receptionist announces a staff member while the door lets in a stranger. The display and the check look at the same input but reach different conclusions.
The report describes the behaviour but does not include the underlying code, so the exact implementation mistake is not shown.
Impact
The issue is a phishing aid. An attacker who can get a victim to scan a crafted QR code with Chrome on iOS can present a pop-up that appears to point at a legitimate domain, then send the victim to an attacker-controlled site once the pop-up is tapped. The attack requires the victim to scan the QR code and then tap the preview; it does not work without that interaction. The severity is low, and the report does not describe any further consequences beyond the redirect to the misleading site.
Fix
The report does not state what change was made. The behaviour that needs correcting is the divergence between the URL shown in the pop-up and the URL actually navigated to: whatever truncation is applied for display should not produce a string that resolves to a different host than the one the browser will visit.
Variants to test
These are follow-up ideas for someone hunting similar bugs. "Variant" means a slightly different version of the same idea.
- Other characters that URL parsers treat specially, such as additional backslashes, mixed forward and backward slashes, or encoded equivalents, placed between a trusted-looking domain and an
@. A positive result is a pop-up that shows the trusted domain while navigation goes to the other host. - Userinfo-style URLs where the trusted domain appears before
@and the real host after it, without backslashes. A positive result is the same display/navigation mismatch. - Long URLs where the truncation logic cuts at a different point than the navigation parser. A positive result is a preview whose visible domain differs from the host actually contacted.
- The same crafted URLs entered directly into the address bar rather than scanned, to see whether the preview path is the only place the mismatch appears.
Hunting notes
This kind of bug hides in features that display a shortened or prettified version of a URL: link previews, QR scanners, chat clients that unfurl links, and any interface that shows a domain to help users judge trust. "Unfurl" means turning a bare link into a preview card with a title and domain.
During recon, look for places where the product renders a domain extracted from a URL rather than the URL itself, and compare what is displayed with what is actually requested when the user acts on it. "Recon" is short for reconnaissance: the early phase of looking around a product for interesting behaviour.
The signal is a display routine that parses the URL differently from the navigation routine, especially one that keys on characters like backslashes or @. Testing is cheap: craft URLs that put a trusted domain in the visible position and a different host in the position the parser will actually use, then observe both the preview and the resulting request.
The researcher demonstrated the full path a victim takes: scan the QR code, see the misleading pop-up, tap it, and land on the other host.
Disclosure
The issue was reported through the Chrome VRP by Zeddy in CUHK, rated low severity, with a bounty of 1000.00 USD, and disclosed on 2025-04-29 as CVE-2024-13983. The Chrome VRP is Google's Vulnerability Reward Program, which pays researchers for reporting security bugs in Chrome. A CVE is a public identifier given to a known vulnerability so people can refer to it unambiguously.
Glossary
- URL: the full address of a web page, made of parts such as the scheme, host and path.
- Second-level domain (SLD): the main recognisable part of a domain, just before the final suffix like
.com. - Host: the machine or domain a browser actually connects to when following a URL.
- Scheme: the first part of a URL, such as
http, that says how to reach the address. - Userinfo: the optional username part of a URL that sits before an
@; the real host comes after the@. - Backslash: the
\character, which URL-handling software can treat inconsistently. - Truncate: to cut a string short.
- Parse: to break a piece of text into its parts according to rules.
- Phishing: tricking someone into trusting a link or page that is not what it appears to be.
- QR code: a square barcode that stores text, usually a web address, and is read by a camera.
- Lens: the Chrome component involved in this issue.
- Inappropriate implementation: a bug class meaning a feature was built in a way that does not behave safely.
- Benign: harmless-looking.
- Variant: a slightly different version of the same bug idea.
- Recon: reconnaissance, the early phase of exploring a product for interesting behaviour.
- Unfurl: turning a bare link into a preview card showing a title and domain.
- Chrome VRP: Google's Vulnerability Reward Program, which pays researchers for reporting Chrome security bugs.
- CVE: a public identifier assigned to a known vulnerability.
- Bounty: the money paid to a researcher for a valid report.