-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[plugin-host] Path traversal + XSS fix #5746
Conversation
f22963f
to
aa90126
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I verify this?
linked to #4168 ? |
For the XSS injection, simply make requests -using your browser maybe- like For the path traversal, you need to have at least one plugin, then in the "path" part of the URL, you can walk past the plugin root being served, and get anything you want. |
aa90126
to
97301a6
Compare
b8a9899
to
0a09d41
Compare
@marechal-p Is there a reason why it is not merged? I've seen that @benoitf verified that relative paths are still working. |
I was away and forgot, will rebase and merge. |
The plugin host used to send unescaped responses via HTML, leading to a potential XSS vulnerability. Also, no constraint was applied to the file serving functionality, which means that you can get served any file on the filesystem if you add enough `../` parts in the requested path, walking past the plugin's root being served. This commit prevents clients to request something past the plugin's root, and also encodes the plugin id -requested by the client- in its response. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
0a09d41
to
bfea162
Compare
The plugin host used to send unescaped responses via HTML, leading to
a potential XSS vulnerability. Also, no constraint was applied to the file
serving functionality, which means that you can get served any file on
the filesystem if you add enough
../
parts in the requested path,walking past the plugin's root being served.
This commit prevents clients to request something past the plugin's
root, and also encodes the plugin id -requested by the client- in its response.
Signed-off-by: Paul Maréchal paul.marechal@ericsson.com