Skip to content
Heist/ feed
Back to feed
Medium

ZKsync Era evaluation order of Yul function arguments

Type: advisorySources: OSV

ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum. Prior to version 1.3.10, there is a very specific pattern `f(a(),b()); check_if_a_executed_last()` in Yul that exposes a bug in evaluation order of Yul function arguments. This vulnerability has been fixed in version 1.3.10. As a workaround, update and redeploy affected contracts.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-35229
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:18 UTC · Revision 1

Source evidence

ZKsync Era evaluation order of Yul function arguments

core-osv · Original source

Published 27 May 2024, 16:20 UTC

ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum. Prior to version 1.3.10, there is a very specific pattern `f(a(),b()); check_if_a_executed_last()` in Yul that exposes a bug in evaluation order of Yul function arguments. This vulnerability has been fixed in version 1.3.10. As a workaround, update and redeploy affected contracts.

osv:CVE-2024-35229
Complete source record
{
  "id": "98d4ec8584d4c9c8f377daa62e6afad5eda1ffed1780133a2391510227227104",
  "url": "https://osv.dev/vulnerability/CVE-2024-35229",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ZKsync Era evaluation order of Yul function arguments",
    "summary": "ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum. Prior to version 1.3.10, there is a very specific pattern `f(a(),b()); check_if_a_executed_last()` in Yul that exposes a bug in evaluation order of Yul function arguments. This vulnerability has been fixed in version 1.3.10. As a workaround, update and redeploy affected contracts.",
    "evidence": "osv:CVE-2024-35229",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-35229",
      "aliases": [
        "CVE-2024-35229",
        "GHSA-jf9w-7f5g-j95p"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/matter-labs/era-compiler-solidity",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "46ce047b51576495779b9f67534207d8154eab79"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "46ce047b51576495779b9f67534207d8154eab79"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35229.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.321464365Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35229.json",
        "https://github.com/matter-labs/era-compiler-solidity/security/advisories/GHSA-jf9w-7f5g-j95p",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-35229",
        "https://github.com/matter-labs/era-compiler-solidity/commit/46ce047b51576495779b9f67534207d8154eab79"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-696"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.3.10"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.3.10"
                  },
                  {
                    "fixed": "1.3.10"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35229.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-35229",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505642,
  "published_at": "2024-05-27T16:20:27.432+00:00"
}