New experimental query: Clipboard-based XSS · Issue #422 · github/securitylab · GitHub
Skip to content

New experimental query: Clipboard-based XSS #422

Closed

Description

@bananabr

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.

Activity

  1. added
    All For OneSubmissions to the All for One, One for All bounty
    on Aug 17, 2021
  2. intrigus-lgtm commented on Aug 17, 2021

    @intrigus-lgtm
    Contributor

    Do you plan to apply for the "Bug Slayer" bounty?

  3. bananabr commented on Aug 17, 2021

    @bananabr
    Author

    I would need at least four vulnerabilities on real-world projects right @intrigus-lgtm? So I think I am sticking to the "All For One" program for now.

  4. bananabr commented on Aug 17, 2021

    @bananabr
    Author

    I found a couple of minor projects with this type of vulnerability where the current version does not work but the following simplified query does https://gist.github.com/bananabr/f16274b0d0d4afa9c63d5de761f7f520. Here is a sample vulnerable function that exemplifies this case https://gist.github.com/bananabr/8a40858d9abec3e5ce60f9e3e81384df.

    Any idea why the submitted query does not detect this case?

    Thanks!

  5. ghsecuritylab commented on Aug 26, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status Generate Query Results.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

  6. bananabr commented on Aug 30, 2021

    @bananabr
    Author

    I want to inform I wrote an article about CodeQL and the query submitted here at https://medium.com/codex/hunting-for-xss-with-codeql-57f70763b938

  7. bananabr commented on Sep 7, 2021

    @bananabr
    Author

    Hey team,
    Any idea how much more time the generate results step should take?

  8. anticomputer commented on Sep 7, 2021

    @anticomputer
    Contributor

    Hey team,
    Any idea how much more time the generate results step should take?

    Hi @bananabr I've pinged the review team to ask for a status update on your behalf.

  9. bananabr commented on Sep 7, 2021

    @bananabr
    Author
  10. bananabr commented on Sep 17, 2021

    @bananabr
    Author

    I see my change proposal has already been merged in github/codeql#6584 and I have already been referenced in fixes for vulnerabilities found using this query. Is this still the "Generate Query Results" step? This is my first time contributing to the program so I am still unfamiliar with the process.

  11. ghsecuritylab commented on Sep 17, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status FP Check.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

  12. ghsecuritylab commented on Sep 20, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status CodeQL review.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

  13. ghsecuritylab commented on Sep 20, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status SecLab finalize.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

  14. xcorail commented on Sep 20, 2021

    @xcorail
    Contributor

    Hello @bananabr
    Can you please provide a public email address or send me one privately? It's used for the reward payment
    Thanks

  15. bananabr commented on Sep 20, 2021

    @bananabr
    Author

    Just sent you an email @xcorail

  16. ghsecuritylab commented on Sep 20, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status Pay.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

  17. xcorail commented on Sep 20, 2021

    @xcorail
    Contributor

    Created Hackerone report 1345484 for bounty 335989 : [422] New experimental query: Clipboard-based XSS

  18. ghsecuritylab commented on Sep 20, 2021

    @ghsecuritylab
    Collaborator

    Your submission is now in status Closed.

    For information, the evaluation workflow is the following:
    SecLab review > Generate Query Results > FP Check > CodeQL review > SecLab finalize > Pay > Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    All For OneSubmissions 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