-
Notifications
You must be signed in to change notification settings - Fork 253
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
JavaScript: Add some new XSS sinks and sources of Next.js (and some extra improvements) #747
Comments
here is a database for quicker evaluation |
Hi @tyage, which query from the "CWE-79" folder should detect the vulnerability? I have built codeql database from https://github.com/keystonejs/keystone/archive/refs/tags/@keystone-6/[email protected], but it doesn't detect anything. |
Hi @JarLob , did you tested with #12975 branch? Xss.ql should detect XSS if it is merged. |
I applied it manually, it is just one function if I didn't miss anything. |
@JarLob |
Thanks, I was able to get the alerts after |
Looking at how the CVE was fixed and seeing your query still flags it, do you think it is a false positive or the fix was insufficient? |
Yes, this is a false positive. |
Your submission is now in status Test run. For information, the evaluation workflow is the following: |
I'll try to see how much noise it generates, but it can be a blocker for acceptance. |
Your submission is now in status Results analysis. For information, the evaluation workflow is the following: |
Your submission is now in status Query review. For information, the evaluation workflow is the following: |
Your submission is now in status Final decision. For information, the evaluation workflow is the following: |
Your submission is now in status Pay. For information, the evaluation workflow is the following: |
Created Hackerone report 2018679 for bounty 487346 : [747] JavaScript: Add some new XSS sinks and sources of Next.js (and some extra improvements) |
Your submission is now in status Closed. For information, the evaluation workflow is the following: |
Query PR
github/codeql#10984
github/codeql#12787
github/codeql#12963
github/codeql#12975
Language
JavaScript
CVE(s) ID list
CVE-2022-0087
CWE
CWE-79
Report
What is the vulnerability?
Reflected XSS
How does the vulnerability work?
When a victim visits the URL which contains malicious script, it will be evaluated on victim's browser.
What strategy do you use in your query to find the vulnerability?
I added Next.js router's query and some args in getServerSideProps function, which is commonly used to receive query/path parameter in URL, as sources.
JS: Add Next.js parameters as source codeql#10984
I also added Next.js router's query.push as a sink for XSS.
JS: Add New XSS sink - Next.js router.push/replace codeql#12787
I also made some improvements to enable CodeQL detect when the application require submodule package and useRouter comes from other modules.
JS: Track interfile useRouter codeql#12963
JS: Support sub modules codeql#12975
How have you reduced the number of false positives?
I think we won't see any false positives.
Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).
Blog post link
No response
The text was updated successfully, but these errors were encountered: