Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

New experimental query: Clipboard-based XSS #422

Copy link
Copy link
@bananabr

Description

@bananabr
Issue body actions

Query

Link to pull request with your CodeQL query:

Relevant PR: github/codeql#6498

CVE ID(s)

Report

The Javascript clipboard api is a source of user input not currently covered by CodeQL's official XSS queries. The proposed query is an answer to this gap and has already been used to find vulnerabilities in relevant projects as listed above.

  • Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).

Result(s)

Limitations

Although the process of creating this query led me to find CVE-2021-37700, the current query does not cover its case. For some reason, although the reference to event.clipboardData is found at https://github.com/github/paste-markdown/blob/v0.3.3/src/paste-markdown-table.ts#L40 by the clipboardDataTransferSource predicate, its use in https://github.com/github/paste-markdown/blob/v0.3.3/src/paste-markdown-table.ts#L91 is not detected by the clipboardDataSource predicate. Any help with this would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    All For OneSubmissions to the All for One, One for All bountySubmissions to the All for One, One for All bounty

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.