Skip to content
Heist/ feed
Back to feed
High

zkvyper ignored loop range bounds

Type: advisorySources: OSV

zkvyper is a Vyper compiler. Starting in version 1.3.12 and prior to version 1.5.3, since LLL IR has no Turing-incompletness restrictions, it is compiled to a loop with a much more late exit condition. It leads to a loss of funds or other unwanted behavior if the loop body contains it. However, more real-life use cases like iterating over an array are not affected. No contracts were affected by this issue, which was fixed in version 1.5.3. Upgrading and redeploying affected contracts is the only way to avoid the vulnerability.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-43366
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 05:51 UTC · Revision 1

Source evidence

zkvyper ignored loop range bounds

core-osv · Original source

Published 15 Aug 2024, 20:11 UTC

zkvyper is a Vyper compiler. Starting in version 1.3.12 and prior to version 1.5.3, since LLL IR has no Turing-incompletness restrictions, it is compiled to a loop with a much more late exit condition. It leads to a loss of funds or other unwanted behavior if the loop body contains it. However, more real-life use cases like iterating over an array are not affected. No contracts were affected by this issue, which was fixed in version 1.5.3. Upgrading and redeploying affected contracts is the only way to avoid the vulnerability.

osv:CVE-2024-43366
Complete source record
{
  "id": "90c871fc8e11bc4290e2d36085de31804c554f02ccd5fc7fea3da565ac2b4cec",
  "url": "https://osv.dev/vulnerability/CVE-2024-43366",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "zkvyper ignored loop range bounds",
    "summary": "zkvyper is a Vyper compiler. Starting in version 1.3.12 and prior to version 1.5.3, since LLL IR has no Turing-incompletness restrictions, it is compiled to a loop with a much more late exit condition. It leads to a loss of funds or other unwanted behavior if the loop body contains it. However, more real-life use cases like iterating over an array are not affected. No contracts were affected by this issue, which was fixed in version 1.5.3. Upgrading and redeploying affected contracts is the only way to avoid the vulnerability.",
    "evidence": "osv:CVE-2024-43366",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-43366",
      "aliases": [
        "CVE-2024-43366",
        "GHSA-8j77-7rrv-6pxx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/matter-labs/era-compiler-vyper",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "b80a9b4ea43aef1ab0415fc6cab33683c44c15bc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.3.12"
                      },
                      {
                        "fixed": "1.5.3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:matter-labs:zkvyper:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.3.12"
                      },
                      {
                        "fixed": "1.5.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.5.2",
            "1.5.1",
            "1.5.0",
            "1.4.1",
            "1.4.0",
            "1.3.17"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-43366.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:43.226252481Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43366.json",
        "https://github.com/matter-labs/era-compiler-vyper/security/advisories/GHSA-8j77-7rrv-6pxx",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-43366"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-835"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43366.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-43366",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 510847,
  "published_at": "2024-08-15T20:11:56.456+00:00"
}