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
- My AI/LLM predictions for the next 1, 3 and 6 years, for Oxide and Friends - 10th January 2025
- Weeknotes: Starting 2025 a little slow - 4th January 2025
- I still don't think companies serve you ads based on spying through your microphone - 2nd January 2025