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

Security Vulnerability - Content Injection #22

Closed
benmap-brex opened this issue Feb 11, 2020 · 7 comments
Closed

Security Vulnerability - Content Injection #22

benmap-brex opened this issue Feb 11, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@benmap-brex
Copy link

benmap-brex commented Feb 11, 2020

Impact:
Medium
(remotely explotiable with non-default configuration)

CVSS v 3.1 Vector:
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

The admin panel logs pages are vulnerable to HTML injection. An attacker can craft a phishing page using HTML + CSS and trick admins who view the page into disclosing their credentials. CSP prevents JS execution, but JS execution isn’t necessary to do damage.

keymaster_html_injection

@benmap-brex benmap-brex changed the title Security Vulnerability - Content Injection - Medium Risk Security Vulnerability - Content Injection Feb 11, 2020
@cviecco
Copy link
Contributor

cviecco commented Feb 11, 2020

benmap-brex. I am unable to follow how this can happen on default configuration. (no logs exposed). Can you please elaborate?

@benmap-brex
Copy link
Author

Hey, not sure what the default config is, but usernames are not HTML encoded when reflected into the /logs endpoint on port 6920. If an attacker POSTs to the login endpoint with a username containing HTML it will show up in the logs, as shown in the screenshot above.

@cviecco
Copy link
Contributor

cviecco commented Feb 12, 2020

I agree with you... @rgooch : this is what happens when templates are not used. Since this happens only when public logs are enabled (non default) I am accepting this as bug, but making this a medium issue.

@cviecco cviecco added the bug Something isn't working label Feb 12, 2020
@cviecco
Copy link
Contributor

cviecco commented Feb 12, 2020

I updated the impact and accepted this as bug

@benmap-brex
Copy link
Author

Thanks for checking into this! Again, didn't know it wasn't a default config 👍

@rgooch
Copy link
Member

rgooch commented Feb 13, 2020

Given this was exposed with a non-default configuration, is there anything we should/can do here?
@cviecco: I'm not sure what the relevance of templates vs. not using templates is. The /log endpoints dump the contents of the log files and the in-memory log buffer. I don't think the logs should be processed in any way by this endpoint.

@rgooch
Copy link
Member

rgooch commented Feb 13, 2020

I've merged code (Cloud-Foundations/Dominator#49) which escapes HTML sequences in the logs display. Anyone building from HEAD will have this fix. I think that completes the source code side of this, so closing. Please re-open if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants