The L2SharedBridge contract's initialize function fails to assign the l1LegacyBridge address, leaving it as zero. As a result, deposits made through the old L1ERC20Bridge before its upgrade cannot be finalised on L2, causing those transactions to fail.
In zkSync's bootloader, the refund calculation for transactions that use a paymaster passes a maximum refundable gas value that does not subtract the gas spent on pubdata. A user with a paymaster could therefore receive a refund for pubdata gas they actually consumed, slowly draining funds from the paymaster.
The unfreezeChain function in StateTransitionManager mistakenly calls freezeDiamond instead of unfreezeDiamond, so calling it freezes the chain again rather than unfreezing it. A frozen chain cannot be unfrozen through this function, though the admin can still unfreeze it via another path.
The StateTransitionManager contract lacks a method to force upgrade a deployed state transition contract, despite documentation stating it should be able to in urgent high-risk situations. This means a chain could postpone or avoid an upgrade, invalidating the designed safeguard.
During the zkSync Era upgrade, a user could finalize an ERC20 withdrawal on the old L1ERC20Bridge and then finalize the same withdrawal again on the new L1SharedBridge if the withdrawal's L2 batch number equals or exceeds the predefined eraFirstPostUpgradeBatch. This allows a double withdrawal of funds under specific edge conditions.
The zero-knowledge circuit for the div opcode failed to range-constrain the subtraction result used to check that the remainder is less than the divisor. A malicious validator could exploit this to generate a valid proof for an incorrect division result, potentially manipulating smart contracts that rely on div.
ETH held on L2 by externally owned accounts cannot be used as msg.value in L1-to-L2 transactions, because such transactions only mint ETH from L1. A malicious operator that ignores L2 transactions could therefore trap users' L2 ETH, violating the guarantee that users can withdraw funds via L1 before a malicious upgrade.
The bootloader's sendCompressedBytecode function lacked a check that originalBytecodeOffset equals afterSelectorPtr + 64 and used unsafe arithmetic, allowing the operator to pass extra bytes or malformed calldata. This could let the operator spend part of the transaction gas limit or force the Compressor::publishCompressedBytecode call to revert.
The zkSync Era L2 did not enforce EIP-155 for legacy transactions, so a transaction signed without a chain ID could be replayed on zkSync. An attacker could replay an old mainnet transaction to steal funds from a user who had deposited into zkSync.
The constant that marks the highest precompile address was not updated when two new precompiles were added, so the system does not treat them as precompiles. As a result, the code hash function returns zero instead of the expected empty-string hash for those addresses.
When an L1-to-L2 transaction fails on zkSync, the bootloader burns all remaining execution gas instead of refunding the unused portion to the sender. An attacker or unlucky user could lose a significant amount of gas fees, especially for computationally intensive transactions with large gas limits.
The transaction validator checked the intrinsic gas cost against the total gas limit, which already includes operator overhead, instead of the remaining gas after overhead. An attacker could submit L1-to-L2 transactions that cover only the larger of overhead or intrinsic costs, forcing the operator to process them without full compensation.
The zkSync Era circuit for the `shr` (right shift) opcode failed to constrain the remainder of the division used to implement the shift to be less than the divisor. A malicious validator could therefore generate a valid proof with an incorrect shift result, potentially manipulating smart contracts that rely on shifts, such as a DEX price calculation.
The zkSync VM's handling of out-of-bounds reads on fat pointers skips memory access but fails to zero the destination register, allowing an attacker to forge arbitrary read values. This violates the principle that if memory state is not enforced, the memory value should not be used.
The range check in the binop reduction gate only verifies that the and and or results are less than 128, but does not check the xor result. An attacker could forge arbitrary results for the and and or opcodes, and cause an overflowed UInt8 xor result to remain in the circuit, potentially leading to unexpected behaviour.
The zero-knowledge circuit that sorts logs did not enforce enough ordering constraints, so a crafted sorted queue could pass validation even though it interleaved write and rollback entries incorrectly. An attacker could then cause already reverted L1 logs and events to be emitted as if they were valid.
The overhead calculation for transactions in zkSync used inconsistent units: encoding length in bytes but bootloader memory in words (32 bytes). This caused the overhead to be calculated 32 times larger than intended, overcharging users for some transactions.
The bootloader's sendCompressedBytecode function uses nearCallPanic when the Compressor::publishCompressedBytecode call fails, which can be triggered by invalid data from the operator. This allows the operator to burn all gas of an L2 transaction if at least one bytecode is to be published.
The default account on zkSync Era does not allow calling updateNonceOrdering, but an L1 priority transaction bypasses this check because the bootloader sets the isSystem flag for any call to the ContractDeployer. An attacker can permanently freeze their own account by changing its nonce ordering to arbitrary, after which no new transactions can be initiated.
The bootloader's gas refund calculation for L1→L2 transactions uses an unchecked addition, allowing a malicious operator to inflate the refund value and cause an overflow. This lets the operator steal all gas provided by any user.
zkSync Era's deployment nonce for a factory contract does not increment when a child contract's constructor reverts, unlike the EVM where the nonce is consumed regardless of success. This divergence can cause factory-deployed contract addresses to differ between chains, breaking assumptions that factories behave consistently with the EVM.
The zero-knowledge circuit for the EraVM division opcode enforced a multiplication relation even when the divisor was zero, which does not hold for a non-zero dividend. An attacker could submit a transaction that made the circuit unprovable, causing a denial of service on the priority queue.
The timestamp constraints in zkSync's batch and block creation allow the operator to set a batch timestamp far in the future, which limits the number of blocks that can be included in subsequent batches and prevents committing multiple batches in the same Ethereum block. This can lead to slower soft confirmations and potential bottlenecks during high transaction volumes.
The report claims that having a single externally owned account (EOA) as the sole owner of several contracts creates a centralisation risk and a single point of failure. An attacker who compromises the private key, or a malicious owner, could perform a rug-pull or otherwise abuse the privileged functions.
The compression mechanism for publishing bytecode to L1 allows a malicious operator to artificially inflate the dictionary length, increasing the gas cost charged to users without any benefit. This could lead to users paying higher gas fees for message publication.
zkSync Era starts the deployment nonce for newly created contracts at zero, whereas the EVM (per EIP-161) increments it by one before the constructor runs. This discrepancy can cause factories that predict child contract addresses based on the EVM nonce behaviour to compute incorrect addresses, potentially leading to lost funds if ETH is sent to a mispredicted address.
The zkSync Era's emulation of the extcodehash opcode diverges from EIP-1052 for accounts with zero code and non-zero balance, and for precompile addresses. An attacker could exploit this inconsistency to cause smart contracts that rely on the opcode's standard behaviour to misbehave.
The default account's fallback function reverts when called via delegatecall from a custom account, breaking the promised EOA-like behaviour. An attacker could exploit this discrepancy to cause unexpected failures in protocols that rely on consistent behaviour.
In zkSync Era, calling the ECRECOVER precompile through delegatecall returns a zero value instead of the recovered address, unlike standard EVM behaviour where call, staticcall and delegatecall all agree. A contract relying on this path could accept an invalid signature or misidentify a signer, which may compromise data integrity or funds.
The L1 executor clears the stored L2 upgrade transaction hash and advances the protocol version even when the L2 upgrade transaction fails on L2. This leaves the recorded protocol version out of sync with the actual L2 state and breaks the requirement that upgrade transaction hashes be unique.
ZE
zkSync Era
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.