OkCupid had a CSRF vulnerability (via) Good write-up of a (now fixed) CSRF vulnerability on OkCupid. Their site worked by POSTing JSON objects to an API. JSON POSTs are usually protected against CSRF because they can only be sent using fetch()
or XMLHttpRequest
, which are protected by the same-origin policy. Yan Zhu notes that you can use the enctype="text/plain"
attribute on a form (introduced in HTML5) and a crafty hidden input element with name='{"foo":"' value='bar"}'
to construct JSON in an off-site form, which enabled CSRF attacks.
Recent articles
- Gemini 2.0 Flash: An outstanding multi-modal LLM with a sci-fi streaming mode - 11th December 2024
- ChatGPT Canvas can make API requests now, but it's complicated - 10th December 2024
- I can now run a GPT-4 class model on my laptop - 9th December 2024