Closed Bug 1912537 (CVE-2024-10460) Opened 2 years ago Closed 2 years ago

Should display origin in external protocol prompt if it does not match origin displayed in URL bar (Spoofing external protocol origin using data: url)

Categories

(Firefox :: File Handling, defect, P1)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
133 Branch
Tracking Status
firefox-esr115 - wontfix
firefox-esr128 132+ verified
firefox131 --- wontfix
firefox132 + verified
firefox133 + verified

People

(Reporter: fazim.pentester, Assigned: Gijs)

References

Details

(Keywords: csectype-spoof, reporter-external, sec-moderate, Whiteboard: [client-bounty-form] [adv-main132+] [adv-esr128.4+])

Attachments

(3 files, 3 external files)

Attached file poc.html —

Firefox's external protocol handling can be exploited to conceal the origin when opened on a data URL within an iframe. As a result, a malicious site could completely hide the origin and overlay content on top of another website, enabling spoofing attacks.

Steps to Reproduce:

  1. Open the provided poc.html file in the latest version of Firefox on Windows.
  2. Click the button test to verify if the origin is displayed correctly. Then, click on test spoof to observe that the origin is not shown.
Flags: sec-bounty?
Summary: Spoofing protocol origin using data: url → Spoofing external protocol origin using data: url
Attached video demo.mp4 —
See Also: → CVE-2022-22748
Group: firefox-core-security → core-security
Component: Security → DOM: Security
Product: Firefox → Core
Group: core-security
Component: DOM: Security → File Handling
Product: Core → Firefox
Group: firefox-core-security

The resulting thing is clearly a new little browser window, so there's some chance for a user to see that something is awry, and the URL bar isn't exactly wrong, but the over all effect is a bit confusing.

Keywords: sec-moderate
OS: Unspecified → All
Hardware: Unspecified → Desktop
Summary: Spoofing external protocol origin using data: url → Should display origin in external protocol prompt if it does not match origin displayed in URL bar (Spoofing external protocol origin using data: url)

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1916742
Duplicate of this bug: 1916742
See Also: 1916742 →
Severity: -- → S3
Priority: -- → P1
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/390f0dcb08c2 adjust principal display logic for external protocol dialog, r=pbz
Group: firefox-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Attachment #9428238 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Confusing display of origin for external protocol handler prompt
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: see comment 0
  • Risk associated with taking this patch: Low
  • Explanation of risk level: The existing code has decent test coverage and this is a relatively small JS only patch
  • String changes made/needed: No
  • Is Android affected?: no
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

I managed to reproduce this issue in Beta v131.0 (RC) and v132.0b1; the pop-up refers to the website as "this site":
"Allow this site to open the ms-calculator link with Calculator?"

I have verified this fix in Nightly v133.0a1; the pop-up refers to the website as "https://bug1912537.bmoattachments.org":
"Allow https://bug1912537.bmoattachments.org to open the ms-calculator link with Calculator?"

Testing has been performed on Windows 10. I will be closing this report. Thank you.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
OS: All → Windows

While we agree this is an issue that we can improve, this is relying highly on the small popup and navigated background page to imply that the prompt comes from the other domain. Additionally, the prompt does not actually display a misattributed origin (but rather an ambiguous 'this site'). Given these factors we will be awarding this issue a Hall of Fame entry but not a bounty.

Flags: sec-bounty?
Flags: sec-bounty-hof+
Flags: sec-bounty-
Attachment #9428238 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Please nominate this for ESR128 approval when you get a chance. It grafts cleanly.

Flags: needinfo?(gijskruitbosch+bugs)
Attachment #9428533 - Flags: approval-mozilla-esr128?

esr128 Uplift Approval Request

  • User impact if declined: potential confusion in external protocol prompt
  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: see earlier comment
  • Risk associated with taking this patch: low
  • Explanation of risk level: The existing code has decent test coverage and this is a relatively small JS only patch
  • String changes made/needed: no
  • Is Android affected?: no
Flags: qe-verify+
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #9428533 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Regressions: 1923655

I can also confirm this fix on Beta v132.0b8 and ESR v128.4.0esr in Windows 10. The site domain is shown correctly.

Whiteboard: [client-bounty-form] → [client-bounty-form] [adv-main132+] [adv-esr128.4+]
Alias: CVE-2024-10460
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: