-
Notifications
You must be signed in to change notification settings - Fork 186
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
sec. vuln.: brackets {{ and }} in URL can trigger template engine #266
Comments
Is this lib still maintained? This is a not-so-small security issue... requests like |
Sorry I missed this @capc0, that looks pretty bad indeed. We have a plan to move our lodash dependency to a separate library in the 5.x series, is currently the source of most of the security issues in the library, what do you think we can do for now? |
I suggest removing the usage of the template engine when a custom message function is declared. So alwas Maybe create a property within |
Hey @bithavoc is this package still maintained? |
short answer: yes I can't fix this right now and the typescript + lodash split seems like a long effort. I can accept a PR to fix this specific issue though. |
Okay, thanks for your reply @bithavoc! I have a quick fix in mind, that would basically follow the suggestion @capc0 made. Can you give me write permissions to this repo so that I can open a PR? Thanks! |
you don't need write permission to the repo, you're welcome to fork and send a Pull Request |
Sure, here's the PR:#284 |
This is a critical security vulnerability. Like CVE-level critical. Arbitrary remote code execution means an attacker could do anything on your server, potentially without you knowing. I won't share code snippets for security reasons, but I have confirmed that a vulnerable server could be exploited to read/write arbitrary files, read/write to any databases it has access too, and exfiltrate the full environment variables of the host. I'm sure there's more a sophisticated hacker could do as well. This needs to be fixed and a security advisory published ASAP. |
@bithavoc The comment from @thislooksfun is on point. Please see if you can accept that pull request. It can hardly make the situation worse unless it's actively malicious. |
If any request constains
{{
or}}
in the URL, e.g.http://url.tld?param={{dummy}}
the following log always errors.
with
this might also cause some security issues.
http://url.tld?param={{console.log(1)}}
actually prints1
in the console...How can I disable the template engine, since I provide my own
msg
function?The text was updated successfully, but these errors were encountered: