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

// resources ⟶ disclosures

Halborn Cadence (Flow) Vulnerability Discovery

Introduction

Halborn security researcher Ferran Celades identified a vulnerability in the Secure Cadence update to Cadence during an audit engagement with Dapper Labs.  This vulnerability affected how the Flow blockchain managed resources.  Halborn has worked with Cadence to deploy an update that addressed the issue.

Description and Overview

Cadence, the Flow blockchain’s programming language, inappropriately allowed destroyed resources to be accessed and used.  The update enabled smart contracts to contain references to optional values.  When these optional values were used by a program, they were tested to see if they actually contained a value — i.e. were not nil — and were unwrapped to expose that value.

When resources were destroyed, references to that resource were not invalidated, making it possible to continue to access those resources via these references.  This issue, similar to a “use after free” vulnerability would inappropriately provide access to the memory allocated to the resource even after that memory might have been allocated to another variable.

pub resource R {
    pub var value: Int
    init(value: Int) {
        self.value = value
    }
    pub fun increment() {
        self.value = self.value + 1
    }
}
pub fun main(): Int {
    let resources <- {
        "r1": <-create R(value: 0)
    }
    let ref: &R? = &resources["r1"] as &R?
    destroy <-resources.remove(key: "r1")
    destroy resources
    ref!.increment()
    log(ref!.value)
    return 1
}
For Smart Contract Developers

Developer Guidance

This vulnerability affects smart contracts that were developed after the Secure Cadence update and that make use of optional values.  If a smart contract uses optional values and creates references to them, these references might not be appropriately cleared after a resource is destroyed.

Developer Mitigation

The Cadence interpreter has been updated to address the issue.  Upon creation of a reference, the type of the inner value is checked.  If the inner value is a resource, it is tracked throughout its lifetime, and, when the resource is destroyed, references to it are invalidated as well.

Have concerns, want to learn more, or have a bug you'd like to disclose? Please reach out to us at disclosures@halborn.com

Halborn is hiring! If you're someone who can help make our products and this industry more secure, consider joining our team.

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.