~/talk

Don't Trust, Verify! - How I Found a CSRF Bug Hiding...

Talkat BSidesSF 2025 · 2025-04-26..04-27· [security, go]
links:none on file
slides:none on file

Discovery: a long‑standing CSRF bug in gorilla/csrf allows an attacker to substitute a valid token by setting a path-specific cookie fixation on a shared parent domain and relying on the library’s tokens not being bound to user identity. Tests used httptest.NewRequest with full URLs so origin checks only run in fixtures, not production; a working demo that scrapes a target for cookie/form pairs proves the exploit and the flaw existed for about a decade. Fix lands in v1.7.3 and browsers already offer fetch metadata headers (99.98% observed compliance) as a safer replacement.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03What is Guerilla CSRF?
  3. 3:54Double submit token limitations
  4. 5:18Customer question sparks research
  5. 6:42Building the attack demo
  6. 9:12Debugging unexpected results
  7. 10:15Go standard library quirks
  8. 12:45Swiss cheese security model
  9. 13:49Timeline of the vulnerability
  10. 14:35Fetch metadata request headers
  11. 17:48Key takeaways and lessons
  12. 19:16Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.