99designs / 99designs/gqlgen

Lack of protection against CSRF attacks

Ouverte
#3,248 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
10.8k
Forks
1.3k
Merge moyen
2 j 36 min
PR mergées (30 j)
26

Description

Hi,

The content-type "multipart/form-data" is enabled by default for POST requests, besides application/json.

I don't want to disable it because I am using it for file uploads.

This is now a security issue, as this makes the API vulnerable to CSRF requests by changing the content type of queries.
See [https://owasp.org/www-community/attacks/csrf] for more information.

Is there a way to enable other content types besides application/JSON for specific actions like file upload?

Is there a plan to implement CSRF tokens?

I've attached an example (change the IP address to yours in the HTML):

```

GQLGen CSRF PoC


history.pushState('', '', '/');





```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.