url.parse() hostname spoofing via javascript: URIs
该报告还没有中文解读。
原文摘录
摘自原文(2269 字符中的一小部分)
Using [url.parse()](https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost) in security sensitive checks is dangerous as an arbitrary hostname can be spoofed via `javascript:` URIs.
原文中的代码
$ node -e 'console.log(require("url").parse("javAscript:alert(1);a=\[email protected]\x27"))'
Url {
protocol: 'javascript:',
slashes: null,
auth: 'alert(1);a=\'',
host: 'white-listed.com',
port: null,
hostname: 'white-listed.com',
hash: null,
search: null,
query: null, …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 Node.js 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @bayotop · 版权归作者与 Node.js 所有