Java - GraphQL Mutations
Last updated
Last updated
Now that the app is running let's go hacking!
The application implements a very basic mutation to create a new post on the blog. The mutation used is the following
If we look at the code we have a class CreatePost
that will implement our logic to create a post.
The method mutate will just get the new Post object and insert an instance in the database.
There are many ways we could exploit this, one would be to delete any post we want. If there is a createPost class there might be another class called deletePost, let's try:
Bingo! Post with id:4 was deleted. If we go back and refresh the application:
You could, of course, achieve the same goal with burp. What else can you exploit using this vulnerability?