Inappropriate implementation in Media (CVE-2025-11212)
The Chrome screen-sharing permission dialog truncates long domain names, so a malicious site with a crafted long domain can appear to be a trusted domain like google.com. An attacker could trick a victim into sharing their screen with the malicious site.
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Steps to reproduce the problem
- Open the vulnerable page in long domain name (possible above 75)
- click the button to start screenshare
- you can see the domain name is truncated and diff domain is showed
To reproduce this issue locally we can follow the below steps
- Add a below entry in hosts file 127.0.0.1 google.drivelogin.accounts.login.safeoauth.truested.newsafelogin.google.com.finallargedomain.com
- place the attached files in one folder and start the server by running python3 filename.py
- Now visit https://googledrivelogin.accounts.logins.safeoauth.truested.newsafelogins.google.com.finallargedomain.com:4443/poc.html in latest chrome
- You can see the popup shows google.com at the end instead of finallargedomain.com
Problem Description
Note: I have already reported this case but was closed as obsolete without further investigation, i have added details here, kindly check the poc video and this comment https://issues.chromium.org/issues/420574505#comment4
Firefox Ref of similar attack in permission prompt: https://bugzilla.mozilla.org/show_bug.cgi?id=1920423
I have seen the similar case in chrome too but i wasnt able to get that bug reference
HI Team, Chrome latest on windows is vulnerable for screenshare domain name spoof which allows the attacker to trick the victim to share the screen to malicious site thinking it of as google.com
Tested on windows 11 pro, chrome canary 138.0.7204.4 (Official Build) canary (64-bit)
Summary
Screen Share Dialog - Domain Spoof (Similar to permission prompt)
Custom Questions
Reporter credit:
Ameen Basha M K
Additional Data
Category: Security
Chrome Channel: Canary
Regression: N/A
Context
Chrome's screen sharing flow asks the user to pick a surface (screen, window or tab) and shows the origin of the requesting site in the picker dialog. The security decision the user makes there depends on that origin being displayed correctly: if the dialog says google.com, the user believes they are sharing with Google. The report describes a case where a long domain name is truncated in that dialog and a different domain is shown, so the user is tricked into sharing their screen with an attacker-controlled site.
The affected component is Chrome's Media stack, specifically the screen share dialog. The report was tested on Windows 11 Pro with Chrome Canary 138.0.7204.4 (Official Build) canary (64-bit). The researcher notes that a similar issue in Firefox's permission prompt was reported in Bugzilla bug 1920423, and that a similar Chrome case exists but the reference could not be found.
Setup
To reproduce locally, the researcher uses a hosts file entry that maps a very long hostname to the loopback address, a local HTTPS server on port 4443, and a page named poc.html. The hostname is deliberately long and is built from Google-looking labels followed by an attacker-controlled suffix.
The hosts entry is:
[redacted] google.drivelogin.accounts.login.safeoauth.truested.newsafelogin.google.com.finallargedomain.com
The page is served over HTTPS on port 4443. The attached files (the Python server script and poc.html) are placed in one folder and the server is started with:
python3 filename.py
Finding it
The researcher opened the vulnerable page under the long domain name and clicked the button that starts screen sharing. In the screen share dialog, the domain name was truncated and a different domain was displayed. The report states that the popup shows google.com at the end instead of finallargedomain.com, which is the registrable domain of the attacker-controlled host. The user therefore sees a Google origin in the picker while the actual origin is the attacker's.
The researcher notes that this case had already been reported once and closed as obsolete without further investigation, and that additional details, including a proof-of-concept video and a comment on the Chromium issue tracker, were added to the new report. The summary is "Screen Share Dialog - Domain Spoof (Similar to permission prompt)".
Exploitation
Step 1: Point a long hostname at the local server
Add the following line to the hosts file so that the long hostname resolves to the loopback address:
[redacted] google.drivelogin.accounts.login.safeoauth.truested.newsafelogin.google.com.finallargedomain.com
The hostname contains many Google-looking labels (google, drivelogin, accounts, login, safeoauth, truested, newsafelogin, google.com) before the actual registrable domain finallargedomain.com. The hostname is long and ends with the attacker-controlled domain.
Step 2: Start the local HTTPS server
Place the attached files in one folder and run the server:
python3 filename.py
The server serves poc.html over HTTPS.
Step 3: Open the page in Chrome
Visit the following URL in the latest Chrome:
https://googledrivelogin.accounts.logins.safeoauth.truested.newsafelogins.google.com.finallargedomain.com:4443/poc.html
Note that the hostname in this URL differs slightly from the hosts entry (extra s in logins and newsafelogins); the report gives both forms. The page loads from the attacker-controlled domain.
Step 4: Start screen sharing and observe the dialog
Click the button on the page to start screen sharing. The screen share dialog opens and displays the origin. Because the hostname is long, the dialog truncates it and shows google.com at the end instead of finallargedomain.com. The user is led to believe the request comes from Google.
Root cause
The report does not describe a root cause; it only shows the dialog displaying a misleading domain. The exact truncation logic is not described in the report.
Impact
An attacker can host a page on a long domain name that ends with a trusted brand and trick a victim into sharing their screen with the attacker's site while the dialog shows the trusted domain. The victim may share sensitive windows, tabs or the entire screen. The report demonstrates the issue on Windows 11 Pro with Chrome Canary 138.0.7204.4; other platforms and channels are not stated.
Fix
The report does not describe a fix. The appropriate fix would be to display the full origin or to truncate it in a way that preserves the registrable domain, for example by eliding the middle of the hostname rather than the beginning, and to ensure the dialog always shows the effective top-level domain plus one label.
Variants to test
- Other permission prompts that display an origin, such as geolocation, notifications, camera and microphone. A positive result is a long hostname that ends with a trusted brand and a prompt that shows the brand instead of the real registrable domain.
- Different truncation lengths: try hostnames just above 75 characters and progressively longer ones to find the threshold where the display flips.
- Internationalised domain names and punycode: a hostname that renders as a trusted brand after IDN conversion may behave differently in the dialog.
- Other browsers: the report references a similar Firefox bug in the permission prompt, so the same technique can be tried there.
Hunting notes
This kind of bug tends to hide in UI components that render user-controlled strings with fixed widths, especially security-sensitive dialogs such as permission prompts, screen share pickers and origin displays. During recon, look for features that show an origin to the user and test them with long hostnames that end in a trusted brand. The researcher showed impact by demonstrating that the dialog displays google.com while the actual site is finallargedomain.com, which is a direct deception of the user at the moment of consent. The report was accepted as a medium-severity issue with a 2000 USD bounty.
What happened, in plain words
When you share your screen in Chrome, a small dialog appears and asks you to choose what to share: your whole screen, one window, or one browser tab. That dialog also shows the address of the website that is asking. The idea is simple: before you hand over a view of your screen, you should be able to check who is asking. If the dialog says google.com, you assume you are sharing with Google.
This report describes a case where that check can be fooled. An attacker can build a website whose address is very long and ends with a trusted-looking name. When Chrome shows that address in the screen sharing dialog, it cuts the address short and the part that remains looks like google.com. The real owner of the site is a different domain, finallargedomain.com, but the user never sees it. So the user thinks they are sharing with Google while they are actually sharing with the attacker.
The affected part of Chrome is called Media, which is the part of the browser that handles audio and video, including screen capture. The researcher tested this on Windows 11 Pro with Chrome Canary 138.0.7204.4 (Official Build) canary (64-bit). Canary is the experimental, fast-moving version of Chrome that gets new code before the normal release. The researcher also points to a similar problem reported in Firefox's permission prompt (the little box that asks whether a site may use your location, your camera and so on), filed as Bugzilla bug 1920423, and mentions that a similar Chrome case exists but the reference could not be found.
The setup
To reproduce the problem on your own machine, the researcher does three things:
- Makes a very long website name point at the computer itself, using the hosts file.
- Runs a small local web server that serves a test page over HTTPS.
- Opens that page in Chrome and clicks the button that starts screen sharing.
The report mentions a domain name possibly above 75 characters. The name is built from lots of Google-looking pieces, followed by a suffix that the attacker really controls.
What the hosts file is, and why it is used
Every time you type a website name, your computer has to turn that name into a numeric address so it can find the server. Normally it asks a DNS server, which is like a phone book for the internet. The hosts file is a small local override: a list on your own computer that says "for this name, use this address" before the phone book is consulted. It is handy for testing because you can invent any name you like and point it at your own machine without registering anything.
The entry used in the report is:
[redacted] google.drivelogin.accounts.login.safeoauth.truested.newsafelogin.google.com.finallargedomain.com
Line by line:
[redacted]is the loopback address, the address a computer uses to talk to itself. Anything sent here never leaves the machine.- The long string after it is the invented website name. It is made of many labels separated by dots:
google,drivelogin,accounts,login,safeoauth,truested,newsafelogin,google.com, and finallyfinallargedomain.com. - The important part is the end. In a website name, the part that actually identifies the owner is the last two labels (roughly), here
finallargedomain.com. Everything before it is chosen freely by whoever owns that domain. So the owner offinallargedomain.comcan create a subdomain that readsgoogle.com.finallargedomain.com, and the browser will still treat it as belonging tofinallargedomain.com. - The length of the whole name is what triggers the display problem in the dialog.
Starting the local server
The researcher places the attached files (a Python script and a page called poc.html) in one folder and starts the server with:
python3 filename.py
Line by line:
python3runs the Python interpreter, version 3.filename.pyis the name of the script. The report uses this placeholder name; the real file is one of the attachments.
The server serves the page over HTTPS. HTTPS is the encrypted version of the web protocol. Port 4443 is simply a port number chosen for the test; the usual HTTPS port is 443.
Finding the problem
The researcher opened the test page under the long domain name and clicked the button that starts screen sharing. In the screen sharing dialog, the domain name was cut short and a different domain was shown. The report says the popup shows google.com at the end instead of finallargedomain.com, which is the domain the attacker really controls. The user therefore sees a Google address in the picker while the actual site is the attacker's.
The researcher notes that this case had already been reported once and closed as obsolete without further investigation, and that extra details, including a proof-of-concept video and a comment on the Chromium issue tracker, were added to the new report. The summary given is "Screen Share Dialog - Domain Spoof (Similar to permission prompt)".
Reproducing it step by step
Step 1: Point a long hostname at the local server
Add the following line to the hosts file so that the long hostname resolves to the loopback address:
[redacted] google.drivelogin.accounts.login.safeoauth.truested.newsafelogin.google.com.finallargedomain.com
This is the same line as in the setup. The hostname contains many Google-looking labels (google, drivelogin, accounts, login, safeoauth, truested, newsafelogin, google.com) before the actual domain finallargedomain.com. The name is long and ends with the attacker-controlled domain. The reason for doing this step is to make the browser believe the test page lives at that long name, without needing to buy or register anything.
Step 2: Start the local HTTPS server
Place the attached files in one folder and run the server:
python3 filename.py
As before, this starts the Python script that serves the page. The server serves poc.html over HTTPS.
Step 3: Open the page in Chrome
Visit the following URL in the latest Chrome:
https://googledrivelogin.accounts.logins.safeoauth.truested.newsafelogins.google.com.finallargedomain.com:4443/poc.html
Line by line:
https://says to use the encrypted web protocol.googledrivelogin.accounts.logins.safeoauth.truested.newsafelogins.google.com.finallargedomain.comis the long hostname. Note that it differs slightly from the hosts entry: there is an extrasinloginsand innewsafelogins. The report gives both forms.:4443is the port the local server is listening on./poc.htmlis the test page itself.
The page loads from the attacker-controlled domain. The reason for opening it in the browser is that the screen sharing dialog only appears when a real page asks for it.
Step 4: Start screen sharing and look at the dialog
Click the button on the page to start screen sharing. The screen sharing dialog opens and displays the address of the site. Because the hostname is long, the dialog cuts it short and shows google.com at the end instead of finallargedomain.com. The user is led to believe the request comes from Google. This is the moment the whole bug is about: the one place where the user is supposed to check who is asking shows the wrong answer.
Why it happens
The report does not describe a root cause; it only shows the dialog displaying a misleading domain. The exact logic of the cut is not described in the report.
What an attacker could do with it
An attacker can host a page on a long domain name that ends with a trusted brand and trick a victim into sharing their screen with the attacker's site while the dialog shows the trusted domain. The victim may share sensitive windows, tabs or the entire screen. The report demonstrates the issue on Windows 11 Pro with Chrome Canary 138.0.7204.4; other platforms and release channels are not stated.
The fix
The report does not describe a fix. A sensible fix would be to show the full address, or to cut it in a way that keeps the real owner's domain visible, for example by hiding the middle of the hostname rather than the beginning, and to make sure the dialog always shows the last part of the name that identifies the owner.
Other places to try the same idea
- Other permission prompts that show an address, such as location, notifications, camera and microphone. A positive result is a long hostname that ends with a trusted brand and a prompt that shows the brand instead of the real domain.
- Different lengths: try hostnames just above 75 characters and then longer ones, to find the point where the display flips.
- Internationalised domain names and punycode: names that use non-Latin characters are converted to a special encoded form, and a name that looks like a trusted brand after that conversion may behave differently in the dialog.
- Other browsers: the report references a similar Firefox bug in the permission prompt, so the same technique can be tried there.
Notes for people hunting for similar bugs
This kind of bug tends to hide in parts of the interface that draw text controlled by the website inside a fixed amount of space, especially security-sensitive dialogs such as permission prompts, screen share pickers and address displays. When looking around, find features that show an address to the user and test them with long hostnames that end in a trusted brand. The researcher showed the impact by demonstrating that the dialog displays google.com while the actual site is finallargedomain.com, which directly deceives the user at the moment they give consent. The report was accepted as a medium-severity issue with a 2000 USD bounty.
Glossary
- API: a set of rules that lets one piece of software ask another to do something, such as a web page asking the browser to start capturing the screen.
- Bugzilla: the public bug tracker used by the Mozilla project, where the Firefox bug referenced in the report was filed.
- Canary: an experimental build of Chrome that receives new code before the normal release, used for early testing.
- Chromium issue tracker: the public system where Chrome bugs are reported and discussed.
- DNS: the internet's phone book, which turns website names into numeric addresses.
- Domain: the part of a website name that identifies its owner, such as
finallargedomain.com. - Hosts file: a small list on your own computer that overrides DNS for chosen names.
- HTTPS: the encrypted version of the web protocol, used for secure pages.
- Internationalised domain name (IDN): a website name that uses non-Latin characters, which browsers convert into a special encoded form.
- Loopback address: the address
[redacted], which a computer uses to talk to itself. - Media component: the part of Chrome that handles audio and video, including screen capture.
- Origin: the combination of protocol, hostname and port that identifies a website; it is what the browser uses to decide who is asking for a permission.
- Permission prompt: the small dialog that asks whether a site may use something like your location, camera or microphone.
- Port: a numbered channel on a computer that a server listens on; 443 is the usual HTTPS port, and the test uses 4443.
- Proof of concept (PoC): a small demonstration that shows a bug really works.
- Punycode: the encoded form that non-Latin website names are converted to.
- Registrable domain: the part of a website name that a person or company actually owns, such as
finallargedomain.com. - Screen share dialog: the Chrome dialog that asks you to pick a screen, window or tab to share and shows who is asking.
- Secure context: a page the browser considers safe enough for sensitive features, normally because it is served over HTTPS.
- Severity: a rating of how serious a bug is; here it is medium.
- Subdomain: a name placed in front of a domain, chosen freely by the domain's owner.
- Truncation: cutting a piece of text short because there is not enough space to show all of it.
- VRP: Chrome's Vulnerability Reward Program, which pays researchers for reporting bugs.