`npmconf` (and `npm` js api) allocate and write to disk uninitialized memory content when a typed number is passed as input on Node.js 4.x
该报告还没有中文解读。
原文摘录
摘自原文(3084 字符中的一小部分)
I would like to report a Buffer allocation issue in `npmconf` (and `npm` package js api). It allows to extract sensitive content from uninitialized memory by passing typed input to `setCredentialsByURI`, limited to Node.js 4.x and below.
原文中的代码
var URI = "https://registry.example.com:8661/";
require('npmconf').load({}, function (err, conf) {
conf.setCredentialsByURI(URI, {username: 'foo', email: '[email protected]', password: 200});
console.log(conf.getCredentialsByURI(URI)); // This just outputs the setting
// conf.save('user', …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 Node.js third-party modules 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @chalker · 版权归作者与 Node.js third-party modules 所有