Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Race You Don't Want To Win.

The Race You Don't Want To Win.

I never imagined that a tiny flaw in our meticulously engineered system could open the door to attackers. But one day, a hidden vulnerability allowed hackers to exploit our high-traffic environment and drain over 70 million in just minutes. We were blindsided.

In this exclusive talk, I’ll share the untold story of how it happened, how we tracked down this elusive vulnerability, and the hard lessons we learned in the aftermath. Attendees will get a behind-the-scenes look at how these hidden threats can silently cause massive damage in any application and why they’re particularly dangerous in high or low-traffic applications.

Through live demos and real-world code examples, I’ll explain how race conditions work, why they’re especially risky in financial transactions, and, most importantly, how you can prevent them in your applications. This session is necessary for anyone securing an online application, especially in high-stakes environments.

This is a race you don’t want to win.

Avatar for Paul Edward

Paul Edward

May 26, 2025

Other Decks in Technology

Transcript

  1. THE RACE YOU DON'T WANT TO WIN How a Small

    Flaw Opened the Door to Hackers
  2. Paul Edward (CTO, Afrinvest) 12+ Yrs experience Open Sourcerer Founder,

    The Infinite Community IWrite- ISpeak - IBuild Builder, Carebot (Telegram Support bot) and Cigza (AI Calendar and Email Management tool) Boxing Advocate HELLO, NOBLE ONE MAY I?
  3. A critical flaw in a financial system allowed users to

    trigger multiple wallet credits simultaneously, exploiting a race condition. This vulnerability led to significant losses, totaling over 50 million, before the issue was patched. THE INCIDENT Imagine building a fortress... but leaving one side gate ajar. INTRODUCTION
  4. “50 hungry guests, one tiny kitchen” “Everyone shouting orders at

    once” “Chaos, duplicate orders, missing dishes” A DINNER RUSH AT YOUR FAVORITE RESTAURANT
  5. WHAT IS A RACE CONDITION? A race condition occurs when

    multiple processes or threads access shared resources simultaneously, and the outcome depends on the order of execution.
  6. RUSHING YOUR MVP? YOU MIGHT BE COOKING UP A “MINIMUM

    VIABLE PANIC” “Shipping fast is good. Shipping flawed is expensive.” Your MVP should be the “Minimum Viable Product”, not a “Minimum Viable Panic!” Lesson: Move fast, but test for race conditions before you serve your dish to users.
  7. Unusual wallet credit spikes Monitoring flagged repeated transactions Manual reconciliation

    confirmed abuse We patched the endpoint… but that wasn’t the end ISOLATE THE PROBLEM – HOW WE CAUGHT THE FLAW “Spot the Flaw, Stop the Bleed.”
  8. Attackers found other entry points to trigger race conditions Realized

    we had multiple exit & entry points for money movement Complexity exposed new vulnerabilities HIT AGAIN - LESSONS FROM THE NEXT ATTACK When Attackers Knock Twice
  9. WHEN EVERYONE CAN COOK In a kitchen where everyone’s in

    charge, dishes get cold, orders get lost In your system, too many modules doing the same job = chaos Security suffers when everyone has the power to move money around This sets up the need for a single source of truth in the next slide! “When Everyone’s a Chef, Nobody Eats”
  10. COMPLEXITY NEEDS A SINGLE SOURCE OF TRUTH Financial logic scattered

    across multiple services/modules Hard to secure everything when business logic is duplicated Lesson: Consolidate complex logic into one single source of truth Use a central service/module to manage money movements Complexity is the Enemy of Security
  11. Chaos ends when you control who enters the kitchen Locks

    ensure only one person can cook at a time. In software, row-level locking and atomic operations act like that door lock. Without it? Duplicate orders, wasted food or in our case, lost money! KEEP YOUR KITCHEN (AND CODE) SECURE! “The Kitchen Door Lock – No Duplicates, No Chaos”
  12. 01 LOCK IT DOWN – ATOMIC OPERATIONS AND ROW-LEVEL LOCKS

    Switched to row-level locking with SELECT FOR UPDATE Rate Limiting Idempotent endpoints using request tokens or Redis locks Real-world: Like making sure the kitchen only serves one dish per order. 02 03 04
  13. WHEN LOCKS ALONE AREN’T ENOUGH Locks Can’t Save You if

    the Logic is Broken Locks only protect one part of the process If you check the balance outside the lock, attackers slip in Balance check and deduction must be atomic – do it together!
  14. LOCKS: A BLESSING OR A BOTTLENECK? Chaos ends when you

    control who enters the kitchen Locks ensure only one person can cook at a time. In software, row-level locking and atomic operations act like that door lock. Without it? Duplicate orders, wasted food or in our case, lost money!
  15. 01 HOW WE SECURED THE SYSTEM 02 O3 04 05

    06 “We didn’t just fix it — we re-architected it.” https://github.com/infinitypaul/idempotency-symfony Row-level locking Idempotency tokens Rate Limiting Atomic balance logic Real-time anomaly detection Clear playbooks for incident response Modular/Service Based Architecture 07
  16. THE REAL RACE Security is not a checkbox It’s a

    principle baked into your dev culture Most breaches don’t come from complexity — they come from assumptions NOTES: “You’re not racing to ship fast. You’re racing to ship safe.”
  17. Q&A LinkedIn: Paul Edward TikTok: Theinfinitypaul Instagram: InfinityPaul GitHub: InfinityPaul

    Youtube: The Infinity Paul Medium: The Infinity Paul KEEP THE QUESTIONS COMING LET‘S CONNECT