Vulnerabilities in pkg:npm/azle

PACKAGE
Advisory Identifier: GHSA-xc76-5pf9-mx8m
Advisory Summary

CVE-2025-29776 is a HIGH security vulnerability vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Azle libraries in the npm ecosystem. The issue involves in azle, calling `settimer` causes infinite loop of timers. Remediation is available by upgrading affected packages to version 0.30.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/azle

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/azle. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xc76-5pf9-mx8m CVE-2025-29776 HIGH In Azle, calling `setTimer` causes infinite loop of timers

CVE-2025-29776 at a Glance

CVE Identifier CVE-2025-29776
GHSA Identifier GHSA-xc76-5pf9-mx8m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Azle
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-29776

To remediate this vulnerability, upgrade all affected Azle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

azle fixed: 0.30.0
npm install azle@0.30.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls azle

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-29776, inspect your project dependencies using npm:

npm ls azle

Analyze the terminal output to locate any version of Azle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.30.0), your application is affected.

Note: The npm ls azle command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Azle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Calling `setTimer` in Azle versions `0.27.0`, `0.28.0`, and `0.29.0` causes an immediate infinite loop of timers to be executed on the canister, each timer attempting to clean up the global state of the previous timer. The infinite loop will occur with any valid invocation of `setTimer`. ### Patches The problem has been fixed as of Azle version `0.30.0`. ### Workarounds If a canister is caught in this infinite loop after calling `setTimer`, the canister can be upgraded and the timers will all be cleared, thus ending the loop.

CVE-2025-29776 Affected Azle Versions

1 component(s)
Fixed Versions:
0.30.0
Product / Package Ecosystem Affected Versions Fixed Version
azle
npm
≥ 0.27.0
< 0.30.0
0.30.0

References

Frequently Asked Questions

What is CVE-2025-29776?
CVE-2025-29776 is a security vulnerability in Azle involving In Azle, calling `setTimer` causes infinite loop of timers under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Azle versions are affected?
Affected versions include releases prior to 0.30.0 across affected packages: azle.
What version fixes CVE-2025-29776?
Upgrading to 0.30.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is azle affected?
Yes, azle is affected in releases prior to 0.30.0. Upgrade your dependency to 0.30.0 or later.
What CWE is associated with CVE-2025-29776?
CVE-2025-29776 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check npm dependencies for CVE-2025-29776?
Run the dependency tree command: 'npm ls azle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xc76-5pf9-mx8m",
  "modified" : "2025-03-15T20:47:15Z",
  "published" : "2025-03-14T17:31:07Z",
  "aliases" : [ "CVE-2025-29776" ],
  "summary" : "In Azle, calling `setTimer` causes infinite loop of timers",
  "details" : "### Impact\n\nCalling `setTimer` in Azle versions `0.27.0`, `0.28.0`, and `0.29.0` causes an immediate infinite loop of timers to be executed on the canister, each timer attempting to clean up the global state of the previous timer.\n\nThe infinite loop will occur with any valid invocation of `setTimer`.\n\n### Patches\n\nThe problem has been fixed as of Azle version `0.30.0`.\n\n### Workarounds\n\nIf a canister is caught in this infinite loop after calling `setTimer`, the canister can be upgraded and the timers will all be cleared, thus ending the loop.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "azle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.27.0"
      }, {
        "fixed" : "0.30.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/demergent-labs/azle/security/advisories/GHSA-xc76-5pf9-mx8m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-29776"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/demergent-labs/azle"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/demergent-labs/azle/releases/tag/0.30.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-14T17:31:07Z",
    "nvd_published_at" : "2025-03-14T14:15:18Z"
  }
}