-
Notifications
You must be signed in to change notification settings - Fork 183
sec. vuln.: brackets {{ and }} in URL can trigger template engine #266
Copy link
Copy link
Open
Description
If any request constains {{ or }} in the URL, e.g.
http://url.tld?param={{dummy}}
the following log always errors.
app.use(expressWinstonLogger({
winstonInstance: logger,
msg: (req: APIRequest, res) => {
return `HTTP ${req.url}`;
},
colorize: true,
}));with
ReferenceError: dummy is not defined
at eval (lodash.templateSources[4]:9:10)
at C:\Users\Simon\Documents\Development\api\node_modules\express-winston\index.js:160:46
at ServerResponse.res.end (C:\Users\Simon\Documents\Development\api\node_modules\express-winston\index.js:419:23)
at ServerResponse.send (C:\Users\Simon\Documents\Development\api\node_modules\express\lib\response.js:221:10)
this might also cause some security issues.
http://url.tld?param={{console.log(1)}} actually prints 1 in the console...
How can I disable the template engine, since I provide my own msg function?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels