Skip to content
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

Path traversal #669

Closed
5 of 6 tasks
ghost opened this issue Jan 11, 2021 · 0 comments
Closed
5 of 6 tasks

Path traversal #669

ghost opened this issue Jan 11, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 11, 2021

In /nodes/ui_base.js, the URL is matched with'/ui_base/js/*' and then passed to path.join,

The lack of verification of the final path leads to a path traversal vulnerability.

We can use this vulnerability to read sensitive data on the server, such as settings.js.

What are the steps to reproduce?

  1. Install node-red-dashboard on node-red server
  2. curl "ip:port/ui_base/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd"

What happens?

The server returns the passwd file content

What do you expect to happen?

404

Please tell us about your environment:

  • Node-RED-Dashboard version: 2.23.0
  • Node-RED version: v1.1.2
  • node.js version: v10.21.0
  • npm version: 6.14.4
  • Platform/OS: linux
  • Browser: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants