mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ The Pug template engine (and other template engines) provides an interpolation f
|
||||
For example, <code>Hello #{user.username}!</code>, could be used for printing a username from a scoped variable user,
|
||||
but the <code>user.username</code> expression will be executed as JavaScript.
|
||||
Unsafe injection of user input in a template therefore allows an attacker to inject arbitrary JavaScript code.
|
||||
For example, a payload of <code>#{global.process.exit(1)}</code> will cause the server to crash.
|
||||
For example, a payload of <code>#{global.process.exit(1)}</code> will cause the below server to crash.
|
||||
</p>
|
||||
|
||||
<sample src="examples/ServerSideTemplateInjection.js" />
|
||||
|
||||
Reference in New Issue
Block a user