One-Click GitHub Token Theft via VS Code Webview Keyboard Ev... - #2571
Open
carlospolop wants to merge 1 commit into
Open
One-Click GitHub Token Theft via VS Code Webview Keyboard Ev...#2571carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://blog.ammaraskar.com/github-token-stealing Content Categories: Based on the analysis, this content was categorized under "Network Services Pentesting > Pentesting Web Methodology > Electron Desktop Apps, as a new subsection/page on VS Code and Electron webview synthetic keyboard-event injection, declarative extension command bridges, and privileged shortcut abuse". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The post presents a one-click exploit chain against
github.devand the VS Code webview security boundary. By opening an attacker-controlled Jupyter notebook, a victim could allow JavaScript running inside a supposedly isolated notebook webview to synthesize keyboard shortcuts, install an attacker-selected VS Code extension, and steal a GitHub OAuth token with read and write access to every repository available to the victim, including private repositories. No CVE...🔧 Technical Details
Synthetic keyboard-event escape from sandboxed webviews: If an application forwards keyboard events from an untrusted cross-origin iframe to a privileged host so global shortcuts continue working, attacker-controlled iframe JavaScript may dispatch synthetic
KeyboardEventobjects and make the host execute privileged shortcuts. The dangerous design copies attacker-controlled properties such askey,keyCode,code,ctrlKey,shiftKey,altKey, andmetaKeywithout ensuring that the event represents trusted physical input. Exploitation uses calls such aswindow.dispatchEvent(new KeyboardEvent("keydown", {...})). Applications should not generically bubble events across trust boundaries and should require trusted user activation or expose narrowly scoped message operations.Shortcut-oriented exploitation when synthetic typing is blocked: ...
🤖 Agent Actions
Updated
src/network-services-pentesting/pentesting-web/electron-desktop-apps/README.md.Added a new VS Code /
github.devsubsection covering:KeyboardEventabuse across webview → host boundaries.vscode/extensions.jsonnotification abuserunCommands/workbench.extensions.installExtensionabuse andskipPublisherTrustAlso appended references for the July 2026 research, VS Code issue
#319593, PRs#319705/#319813, and local workspace extension docs.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.