News for hackers. Stuff that matters.
Re:CORS is not meant to secure an API endpoint by Mavvie on Sunday February 13, 2022 @10:52AM (#30322542)
As mentioned, CORS isn't designed to protect against requests where the response isn't read by another origin's JS. Even with fetch I think you could "bypass" CORS to the same extent as this example by passing the "no-cors" mode.

This is just a CSRF issue, which is well understood and easily fixed with a CSRF/authenticity token.

Also, GET requests should not have side effects like sending an email. A reasonable default seen in some frameworks is GET requests have no side effects and don't require CSRF tokens, while all other verbs do.

There are no comments on this comment yet.