Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter all requests not just xhr, all requests are potentially harmfull (can spy on the user via header, etc...) #16259

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

peter-sanderson
Copy link
Contributor

@peter-sanderson peter-sanderson commented Jan 8, 2025

If we got somehow code injection like this, it will get through as the request-filter.ts only check for xhr requests.

image

Asset loading can be potentially harmful as well. It can be utilized for

  1. Spying on the user with headers
  2. Showing scams and phishing
  3. ... and probably more

ALL requests suite does shall be subject to the whitelisting to reduce the attack vector.

image

For QA

  • this may break some asset loading we have in case we are not whitelisting it
  • I assume that something like fiat-rates, coin logos, etc... may be affected by this

Related to: #7171

@peter-sanderson peter-sanderson self-assigned this Jan 8, 2025
@peter-sanderson peter-sanderson force-pushed the security-filter-all-requests branch from 201c1ff to 798112e Compare January 8, 2025 12:11
Copy link
Contributor

@Lemonexe Lemonexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  • Briefly looking at tokens and invity, I didn't come across any blocked asset (no log in console) ✔️
  • I did not succeed at displaying cat ✔️

@peter-sanderson
Copy link
Contributor Author

/rebase

Copy link

github-actions bot commented Jan 9, 2025

…armfull (can spy on the user via header, etc...)
@trezor-ci trezor-ci force-pushed the security-filter-all-requests branch from 798112e to 591e7aa Compare January 9, 2025 11:04
@peter-sanderson peter-sanderson merged commit 402ab3e into develop Jan 9, 2025
25 checks passed
@peter-sanderson peter-sanderson deleted the security-filter-all-requests branch January 9, 2025 11:19
@bosomt
Copy link
Contributor

bosomt commented Jan 16, 2025

QA OK

  • logos OK
  • guide OK
  • trade OK
  • appstores icons OK
  • DCA section OK
  • ETH tokens OK

Info:

  • Suite version: desktop 25.2.0 (28f0437)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuiteDev/25.2.0 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T3T1 2.8.7 regular (revision 8a254aa8eae82f99630df63f40e4d290066a3efc)
  • Transport: BridgeTransport 2.0.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Approved
Development

Successfully merging this pull request may close these issues.

3 participants