Solutions

Company

Resources

Blog

Contact

Login
    • Advisory

      AI Advisory

      Strategic guidance for secure AI adoption

      Blockchain Architecture Assessment

      Reviewing blockchain designs for security and resilience

      Compliance Readiness

      Aligning controls to evolving regulatory mandates

      Custody and Key Management Assessment

      Securing digital asset custody and key systems

      Risk Assessment

      Clarity on your cybersecurity risk posture

      Technical Due Diligence

      Validating security before third-party commitments

      Technical Training

      Building blockchain and security skills enterprise-wide

    • Assurance

      AI Red Teaming

      Adversarial testing against real-world AI threats

      AI Security Assessment

      Identifying vulnerabilities in AI models and pipelines

      Blockchain Layer 1 Assessment

      Protocol-level security review of L1 networks

      Code Security Audit

      Uncovering vulnerabilities in your source code

      Web Application Penetration Testing

      Exposing exploitable flaws in web applications

      Cloud Infrastructure Penetration Testing

      Finding weaknesses across cloud environments

      Red Team Exercise

      Full-scope adversarial simulation of your defenses

      Smart Contract Assessment

      Code security testing for blockchain-powered applications and systems.

    • Who We Are

      The best security engineers in the world

      Careers

      Work with the elite

      Who Trusts Us

      The trusted security advisor for blockchain and financial services industries

      Brand

      Access official logos, fonts, and guidelines

      Service Commitments

      Committed to Protecting Your Data

    • Audits

      In-depth evaluations of smart contracts and blockchain infrastructures

      BVSS

      Blockchain Vulnerability Scoring System

      Disclosures

      All the latest vulnerabilities discovered by Halborn

      Case Studies

      How Halborn’s solutions have empowered clients to overcome security issues

      Reports

      Comprehensive reports and data

  • Blog

  • Contact

Login

STAY CURRENT WITH HALBORN

Subscribe to the monthly Halborn Digest for our top blogs and videos, major company announcements, new whitepapers, webinar and event invites, and one exclusive interview.

ADVISORY SERVICES

AI AdvisoryRisk AssessmentBlockchain Architecture AssessmentCompliance ReadinessCustody and Key Management AssessmentTechnical Due DiligenceTechnical Training

ASSURANCE SERVICES

AI Security AssessmentAI Red TeamingSmart Contract AssessmentBlockchain Layer 1 AssessmentCode Security AuditWeb Application Penetration TestingCloud Infrastructure Penetration TestingRed Team Exercise

COMPANY

Who We AreWho Trusts UsService CommitmentsCareersBrandBlogContact

RESOURCES

AuditsDisclosuresReportsBVSSCase Studies
Halborn Logo
Privacy PolicyTerms of UseVulnerability Disclosure Policy

© Halborn 2026. All rights reserved.

AI Advisory

Strategic guidance for secure AI adoption

Blockchain Architecture Assessment

Reviewing blockchain designs for security and resilience

Compliance Readiness

Aligning controls to evolving regulatory mandates

Custody and Key Management Assessment

Securing digital asset custody and key systems

Risk Assessment

Clarity on your cybersecurity risk posture

Technical Due Diligence

Validating security before third-party commitments

Technical Training

Building blockchain and security skills enterprise-wide

AI Red Teaming

Adversarial testing against real-world AI threats

AI Security Assessment

Identifying vulnerabilities in AI models and pipelines

Blockchain Layer 1 Assessment

Protocol-level security review of L1 networks

Code Security Audit

Uncovering vulnerabilities in your source code

Web Application Penetration Testing

Exposing exploitable flaws in web applications

Cloud Infrastructure Penetration Testing

Finding weaknesses across cloud environments

Red Team Exercise

Full-scope adversarial simulation of your defenses

Smart Contract Assessment

Code security testing for blockchain-powered applications and systems.

Who We Are

The best security engineers in the world

Careers

Work with the elite

Who Trusts Us

The trusted security advisor for blockchain and financial services industries

Brand

Access official logos, fonts, and guidelines

Service Commitments

Committed to Protecting Your Data

Audits

In-depth evaluations of smart contracts and blockchain infrastructures

BVSS

Blockchain Vulnerability Scoring System

Disclosures

All the latest vulnerabilities discovered by Halborn

Case Studies

How Halborn’s solutions have empowered clients to overcome security issues

Reports

Comprehensive reports and data

THIS WEBSITE USES COOKIES

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. You consent to our cookies if you continue to use our website. Learn More.

blog

Explained: The BadgerDAO Hack (December 2021)

Category: Explained: Hacks

Explained: The BadgerDAO Hack (December 2021)

POSTED BY: Rob Behnke

12.08.2021

    In December 2021, DeFi app BadgerDAO was the victim of a hack.  The attackers stole approximately $120 million in tokens, making this one of the top five largest DeFi hacks to date.

    Inside the Attack

    Unlike many DeFi hacks, the BadgerDAO hack didn’t involve a flash loan attack or exploit a vulnerability in the project’s smart contracts.  Instead, the attacker took advantage of security issues in the protocol’s front-end.

    The hack likely started with a compromised API key for the project’s Cloudflare account.  This allowed the attacker to inject a malicious script into custom routes.

    The attacker’s malicious script was triggered when users attempted to perform transactions on BadgerDAO.  The script included additional unlimited spend approvals for the attacker’s address.  Once these approvals were in place, the attacker could perform transactions that sent tokens from their wallet to the attacker’s account.

    The attacker managed to get 500 wallets to create these unlimited approvals and stole about $120 million in tokens from users.  The attack was halted by the Badger team, who exercised the power to freeze all calls to the transferFrom function, blocking further thefts.

    Lessons Learned From the Attack

    The BadgerDao hack demonstrates the importance of a comprehensive approach to DeFi security.  From the perspective of the project’s smart contracts, nothing had gone wrong, and the attacker was just using the approvals granted by users.  The real problem was in the front-end where the attacker was able to insert malicious functionality into Badger’s site.

    DeFi needs security audits that look beyond smart contract code, and project’s security policies should include protection for critical data like API keys.  On the user side, it’s important to never authorize infinite approvals, especially for unknown addresses.

    Related Blog Posts

    blog

    The 10 Biggest DeFi Hacks of 2021: A Recap

    01.07.2022

    Disclaimer

    The information in this blog is for general educational and informational purposes only and does not constitute legal, financial, or professional advice. Halborn makes no representations as to the accuracy or completeness of the content, which may be updated or changed without notice.

    blog

    The 10 Biggest DeFi Hacks of 2021: A Recap

    01.07.2022