Description
Query PR
github/codeql#10984
github/codeql#12787
github/codeql#12963
github/codeql#12975
Language
JavaScript
CVE(s) ID list
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).
- Yes
- No
Blog post link
No response