Closed Bug 2018513 (CVE-2026-8951) Opened 9 months ago Closed 7 months ago

URL address bar spoofing with RTL domain

Categories

(Firefox for Android :: Toolbar, defect, P2)

All
Android
defect

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox149 --- unaffected
firefox150 --- wontfix
firefox151 + fixed

People

(Reporter: yfbug123, Assigned: petru)

References

Details

(Keywords: csectype-spoof, reporter-external, sec-moderate, Whiteboard: [fxdroid][group3][adv-main151+])

Attachments

(3 files, 2 external files)

Steps to reproduce:

Browsing to a URL with a domain consisting of an English subdomain, followed by a Right-to-Left domain name and Right-to-Left TLD, and followed by digits in the request path, results in a misaligned address bar display that can spoof another site.

It appears that having digits in the request path is the root cause, as the digits blend with the RTL directional run and push the domain and TLD out of view.
If not for the digits, Firefox appears to handle the URL display correctly.
A custom port number in the URL can be used for that purpose as well.

Tested on latest Firefox for Android (+Nightly) running on OnePlus 13 (Android 16) and Galaxy S25 (Android 16).

Reproducing URL hosted on my server:
http://login.accounts.paypal.com.xn--sebaa.xn--9dbq2a/#0

Actual results:

The address bar mainly shows the arbitrarily selected subdomain, followed by a faint ".#"

Expected results:

The domain name and TLD should be present in the address bar

Standard display size

Attached image large_display_size.jpg —

Large display size

Severity: -- → S3
Priority: -- → P2
Whiteboard: [group3]

Hi Tom, can you get this prioritized for squad3? Thanks!

Flags: needinfo?(towhite)

Seeing that Roger is working on a squad5 seciruty ticket, moving this to squad 5. Dev, could you prioritize this?

Flags: needinfo?(daabel)
Whiteboard: [group3] → [group5]
Flags: needinfo?(towhite)

Routing this back to the right squad and person for the task.

Flags: needinfo?(daabel) → needinfo?(petru)
Whiteboard: [group5] → [group3]

Testing with the displayed URL - login.accounts.paypal.com.קקק.קום/#0
Seems like this is essentially a collision between the complex BiDi text rendering and strict UI state logic.
Because of the RTL and LTR text combination the text is having a different character order in memory vs what's visually rendered:

  • we start rendering the LTR login.accounts.paypal.com subdomains chanin
  • then the RTL domain is rendered
    • while computing the end index of the domain we'd use the physical location of the logical end of the domain (the ם character) which in this scenario is actually shown at the far-left of the RTL text - in View.
  • then the #0 LTR anchor pushes that end of the domain actually offscreen
    (just visually. Logically we know the end of the domain is still shown on the screen so we consider the entire domain as being fully shown).
Assignee: nobody → petru
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(petru)
Whiteboard: [group3] → [fxdroid][group3]
Attached file (secure) —

Rely on the visual bounds of the entire domain to scroll it into view.

Attached file (secure) —

Previously the fading gradient applied to the URL was also dependent on the position of
the highlighted domain.
This change makes the fading logic solely dependent on the scroll state of the URL text.

Group: mobile-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Flags: needinfo?(petru)
Whiteboard: [fxdroid][group3] → [fxdroid][group3][adv-main151+][adv-esr115.36+][adv-esr140.11+]
Whiteboard: [fxdroid][group3][adv-main151+][adv-esr115.36+][adv-esr140.11+] → [fxdroid][group3][adv-main151+]
Alias: CVE-2026-8951
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: