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

Injected passkeys.js is leaking its variables and functions to the site #2434

Open
xPaw opened this issue Jan 9, 2025 · 4 comments · May be fixed by #2432
Open

Injected passkeys.js is leaking its variables and functions to the site #2434

xPaw opened this issue Jan 9, 2025 · 4 comments · May be fixed by #2432

Comments

@xPaw
Copy link

xPaw commented Jan 9, 2025

Its injected here:

const passkeys = document.createElement('script');
passkeys.src = browser.runtime.getURL('content/passkeys.js');
document.documentElement.appendChild(passkeys);

As a result, all of its variables are just readable by the site, easy enough to confirm with console:
Image

@droidmonkey
Copy link
Member

See #2432

That's how passkeys work due to the need to override browser functions

@varjolintu
Copy link
Member

There's no way to prevent this. The site must find the script and its contents.

@varjolintu varjolintu closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
@xPaw
Copy link
Author

xPaw commented Jan 9, 2025

This isn't entirely true because you can put all of the consts and functions into the (async () => { scope so that they don't leak globally.

@varjolintu
Copy link
Member

@xPaw If that's true, then I'll have to inspect this further.

@varjolintu varjolintu reopened this Jan 9, 2025
@varjolintu varjolintu linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants