Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

config.admins.hasOwnProperty 漏洞没改完 #122

Closed
gemaogemaojiushiwo opened this issue Dec 21, 2013 · 1 comment
Closed

config.admins.hasOwnProperty 漏洞没改完 #122

gemaogemaojiushiwo opened this issue Dec 21, 2013 · 1 comment
Assignees
Labels

Comments

@gemaogemaojiushiwo
Copy link

现在没在用自己的电脑所以不登大号。。。
内啥,config.admins.hasOwnProperty 这个漏洞没改完。

至少这一处还是个隐患:

https://github.com/alsotang/cnpmjs.org/blob/ee69ff92613d4bf3a836e42232ecf455dcf48215/middleware/auth.js#L25

建议 grep 一下统一修修。


之前在发现这个漏洞的时候,只是简单地利用了一下:绕过权限上传了一个不存在的包而已。但是由于 constructor 这个账号不是 express 包的 maintainer,所以没法覆盖 express 包。我刚才在思考拿到 req.session.isadmin 之后如何绕过 maintainer 的检测,所以回来看了看代码发现了以上那处没有改的地方。

@gemaogemaojiushiwo
Copy link
Author

上述地方的 25 - 27 行去掉就好了。那是个重复赋值。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants