Skip to content
Smart contracts Audit finding Advanced

Reentrancy check in account_contract can be easily circumvented

The reentrancy check in the account contract only blocked calls to Kakarot's getter, but an attacker could re-enter the Kakarot EVM by calling another account contract with a signed transaction. This could compromise the integrity of the EVM due to cached data, though the likelihood is extremely low because the function is only accessible via whitelisted contracts.

RadiantLabs Follow with muellerberndt and zhaojie

Originally disclosed on Code4rena

Submitted by RadiantLabs, also found by muellerberndt and zhaojie

The account_contract has a reentrancy check in execute_starknet_call to prevent calls made from the Kakarot EVM to Starknet to re-enter the Kakarot EVM.

The check is implemented by checking that execute_starknet_call calls Kakarot’s address only with the get_starknet_address getter, which is indeed harmless:

File: account_contract.cairo
332: @external
333: func execute_starknet_call{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}(
334:     to: felt, function_selector: felt, calldata_len: felt, calldata: felt*
335: ) -> (retdata_len: felt, retdata: felt*, success: felt) {
336:     Ownable.assert_only_owner();
337:     let (kakarot_address) = Ownable.owner();
338:     let is_get_starknet_address = Helpers.is_zero(
339:         GET_STARKNET_ADDRESS_SELECTOR - function_selector
340:     );
341:     let is_kakarot = Helpers.is_zero(kakarot_address - to);
342:     tempvar is_forbidden = is_kakarot * (1 - is_get_starknet_address);
343:     if (is_forbidden != FALSE) {
344:         let (error_len, error) = Errors.kakarotReentrancy();
345:         return (error_len, error, FALSE);
346:     }
347:     let (retdata_len, retdata) = call_contract(to, function_selector, calldata_len, calldata);
348:     return (retdata_len, retdata, TRUE);
349: }
350:

However, this check leaves another possibility open, that is that the account_contract could call itself or another account_contract with a signed transaction to re-enter the Kakarot EVM, which is extremely vulnerable to reentrancy because of its extensive use of cached data.

While an exploit via this path can have critical impact on the integrity of the EVM, its likelihood is extremely low because execute_starknet_call is accessible only via whitelisted contracts.

Proof of Concept

Because Kakarot stores the effects of the execution at the very end of it via the Starknet.commit, it openly does not follow the check-effect-interaction pattern, so the integrity of the EVM is at risk of reentrancy via submissions of signed transactions within the call cairo precompile.

Recommended Mitigation Steps

Consider removing the reentrancy check in account_contract, and adding a reentrancy guard on the Kakarot.eth_call function.

ClementWalter (Kakarot) confirmed and commented:

Severity: Medium Re-entrancy is actually possible should the attacker be in possession of the signed tx before this tx is actually executed, and can front run it to store it is starknet before it’s processed. It’s possible, though seems very unlikely. We’ll fix the re-entrancy check to put in in the Kakarot contract level.

obatirou (Kakarot) commented:

On second thoughts because of the whitelisting it is impossible to exploit. The only way to access the execute_starknet_call is through the cairo_precompile but this precompile is whitelisted. At the specified commit for C4, only the DualVMToken contract is whitelisted which cannot lead to the exploit.

We will still do the mitigation with a re-entrancy check at Kakarot contract level.

LSDan (judge) commented:

I’m not willing to jump to “whitelisting makes this impossible to exploit” and still think medium applies. Reentrancy is no joke and a hand wavy hypothetical is enough in this case.

ahmedaghadi (warden) commented:

@LSDan - As attack is only possible through “whitelisting”, doesn’t it comes under Centralization Risks?

LSDan (judge) commented:

Not in this case. The potential for damage is enough for me to keep it in place as a medium.

Kakarot mitigated:

In PR 1582 the reentrancy check is moved at Kakarot level in eth_call.

Status: Mitigation confirmed.


The original report as published on Code4rena, by RadiantLabs. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Kakarot is an EVM implementation running on Starknet. The component at the centre of this report is the account_contract, a Cairo contract that holds the reentrancy check in execute_starknet_call. That function is the path by which the Kakarot EVM can make a call out to Starknet, and the check exists to stop such a call from re-entering the Kakarot EVM.

The check works by inspecting the destination and the function selector: a call is forbidden only when the destination is Kakarot's own address and the selector is anything other than the get_starknet_address getter. The getter is treated as harmless and therefore allowed.

Setup

The report does not describe accounts, tooling or versions beyond the code shown. The relevant precondition is stated in the finding itself: execute_starknet_call is accessible only via whitelisted contracts. At the commit used for the audit, the only whitelisted contract was the DualVMToken contract, and the only route to execute_starknet_call is through the cairo_precompile, which is itself whitelisted.

Finding it

The guard in execute_starknet_call only blocks calls to Kakarot's address with a selector other than the getter. The code is:

Text
File: account_contract.cairo
332: @external
333: func execute_starknet_call{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}(
334:     to: felt, function_selector: felt, calldata_len: felt, calldata: felt*
335: ) -> (retdata_len: felt, retdata: felt*, success: felt) {
336:     Ownable.assert_only_owner();
337:     let (kakarot_address) = Ownable.owner();
338:     let is_get_starknet_address = Helpers.is_zero(
339:         GET_STARKNET_ADDRESS_SELECTOR - function_selector
340:     );
341:     let is_kakarot = Helpers.is_zero(kakarot_address - to);
342:     tempvar is_forbidden = is_kakarot * (1 - is_get_starknet_address);
343:     if (is_forbidden != FALSE) {
344:         let (error_len, error) = Errors.kakarotReentrancy();
345:         return (error_len, error, FALSE);
346:     }
347:     let (retdata_len, retdata) = call_contract(to, function_selector, calldata_len, calldata);
348:     return (retdata_len, retdata, TRUE);
349: }
350:

The function first asserts that the caller is the owner. It then reads Kakarot's address from Ownable.owner() and computes two flags: whether the selector equals GET_STARKNET_ADDRESS_SELECTOR, and whether the destination equals Kakarot's address. The forbidden condition is the product of is_kakarot and the negation of is_get_starknet_address, so only a call to Kakarot with a selector other than the getter is rejected. Everything else proceeds to call_contract.

The gap the researcher identified is that the account_contract could call itself, or another account_contract, with a signed transaction. That path re-enters the Kakarot EVM without ever targeting Kakarot's address with a forbidden selector, so the guard never fires. The researcher describes the EVM as extremely vulnerable to reentrancy because of its extensive use of cached data.

Exploitation

The report gives no concrete request, payload or command. It describes the mechanism rather than a worked exploit.

Step 1: reach execute_starknet_call

The call must originate from a whitelisted contract, since execute_starknet_call is accessible only via whitelisted contracts. The only way to access execute_starknet_call is through the cairo_precompile, which is whitelisted.

Step 2: call an account_contract instead of Kakarot

Rather than directing the call at Kakarot's address with a forbidden selector, the attacker directs it at an account_contract (its own or another one) together with a signed transaction. Because the destination is not Kakarot's address, is_kakarot is false and is_forbidden is false, so the guard passes and call_contract executes.

Step 3: re-enter the EVM

The signed transaction submitted in step 2 re-enters the Kakarot EVM. The researcher notes that Kakarot stores the effects of execution at the very end, via Starknet.commit, so it openly does not follow the check-effect-interaction pattern. During the re-entry the EVM's state is therefore not yet committed, and the integrity of the EVM is at risk.

Root cause

The guard in execute_starknet_call is scoped to a single destination and selector pair: Kakarot's address with anything other than get_starknet_address. It does not account for the account_contract calling itself or another account_contract with a signed transaction, which is a second way back into the EVM. The underlying weakness is that Kakarot commits its execution effects only at the very end through Starknet.commit, so it does not follow check-effect-interaction and cached data is live during a nested call.

The existing defence did not stop this because it only inspects the immediate destination and selector of the Starknet call; a call to an account_contract satisfies neither forbidden condition. The likelihood is kept low by whitelisting, not by the check itself.

Impact

The researcher states that an exploit via this path can have critical impact on the integrity of the EVM, but that its likelihood is extremely low because execute_starknet_call is accessible only via whitelisted contracts.

The Kakarot team's first response rated it Medium and explained the practical route: re-entrancy is possible if the attacker possesses the signed transaction before it is executed and can front run it to store it in Starknet before it is processed. They called this possible but very unlikely, and said they would move the reentrancy check to the Kakarot contract level.

A later comment from the team argued that whitelisting makes exploitation impossible: the only way to reach execute_starknet_call is through the whitelisted cairo_precompile, and at the specified commit for the audit only the DualVMToken contract was whitelisted, which cannot lead to the exploit. They still committed to the mitigation.

The judge was not willing to accept that whitelisting makes the issue impossible to exploit and kept it at Medium, stating that reentrancy is no joke and a hand wavy hypothetical is enough in this case. When asked whether the whitelisting requirement places it under centralisation risks, the judge answered that it does not in this case, because the potential for damage was enough to keep it as a medium.

Fix

The recommended mitigation was to remove the reentrancy check in account_contract and add a reentrancy guard on the Kakarot.eth_call function. Kakarot implemented this: in PR 1582 the reentrancy check is moved to the Kakarot level in eth_call. The mitigation was confirmed.

Variants to test

  • Look for guards that compare only a destination address and a selector, as here. A positive result is a call path that reaches the same sensitive component through a different contract (a sibling instance, a proxy, or the calling contract itself) without matching the forbidden pair.
  • Look for state that is committed only at the end of execution, such as a single final commit call. A positive result is a nested call that observes or acts on cached, not-yet-committed state.
  • Look for access control that relies on a whitelist as the only barrier to a reentrancy path. A positive result is any whitelisted contract whose reachable functions can be composed into the nested call.
  • Look for signed transactions that can be submitted ahead of execution. A positive result is the ability to store a signed transaction before it is processed and have it executed inside a nested call.

Hunting notes

This kind of bug hides where a reentrancy guard is written narrowly around one destination and selector rather than around the entry point that owns the state. During recon, the signals are a guard that enumerates allowed selectors, a single commit at the end of execution instead of check-effect-interaction, and a whitelist that is the only thing standing between an external caller and the guarded function. The researcher named the bypass (calling an account_contract with a signed transaction) and tied it to the EVM's use of cached data and its end-of-execution commit. The program accepted it at Medium even though the team argued whitelisting made it unexploitable, because the judge treated the potential for damage as sufficient.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

Kakarot is a piece of software that lets programs written for one blockchain system (Ethereum) run on a different blockchain system (Starknet). Think of it as a translator sitting between two countries that speak different languages: Ethereum programs arrive on one side, and Kakarot translates their requests so Starknet can carry them out.

Inside Kakarot there is a component called account_contract. It contains a safety check whose job is to stop a particular kind of accident: a request that leaves Kakarot, goes out to Starknet, and then comes straight back into Kakarot while Kakarot is still in the middle of its work. That coming-back-in is called reentrancy, and it is a classic source of serious bugs, a bit like someone re-entering a shop while the till is still open and the cash is on the counter.

The researcher (RadiantLabs, and independently muellerberndt and zhaojie) reported that the safety check only blocks calls to Kakarot's address with a selector other than the getter. There is a second way: the account_contract can call itself, or another account_contract, carrying a signed transaction. That route never matches the pattern the check looks for, so the check stays silent and the re-entry happens anyway.

The impact could be critical for the integrity of the Kakarot EVM (the part that runs Ethereum-style programs), but the likelihood is extremely low, because the function involved can only be reached through contracts on an approved list (a whitelist). The Kakarot team first rated it Medium and said they would move the check to a higher level. A later comment argued the whitelist made exploitation impossible. The judge disagreed and kept it at Medium. Kakarot then moved the check to the Kakarot level in eth_call, and the fix was confirmed.

Background: the pieces you need

Before the code makes sense, here are the moving parts, explained from zero.

  • Blockchain: a shared record book that many computers keep copies of. Nobody can quietly change past entries, because everyone would notice.
  • Smart contract: a small program that lives on a blockchain. It runs automatically when someone sends it a request. It is like a vending machine: you press a button, it does exactly what its code says, no human in the loop.
  • Ethereum and the EVM: Ethereum is one blockchain. The EVM (Ethereum Virtual Machine) is the standard "engine" that runs Ethereum programs. If a program is written for the EVM, it expects an EVM to run it.
  • Starknet: a different blockchain, with its own engine and its own programming language, Cairo.
  • Kakarot: an EVM implementation that runs on Starknet. In plain terms, it is a Starknet program that pretends to be an Ethereum engine, so Ethereum programs can run there. It is the translator between the two worlds.
  • Cairo: the programming language used to write programs for Starknet. The code in this report is Cairo code.
  • account_contract: a Kakarot component written in Cairo. It is the piece that holds the safety check discussed here.
  • Function: a named block of code that does one job. You "call" it by name and give it inputs; it gives you back outputs.
  • Function selector: a short numeric fingerprint that identifies which function of a contract you want to call. Instead of sending the function's name as text, the caller sends this number. It is like choosing a menu item by its number rather than reading out the dish.
  • Address: the identifier of a contract or account on the blockchain, similar to a street address. A call is sent "to" an address.
  • Getter: a function whose only job is to read and return a value, without changing anything. Reading the label on a jar rather than opening it.
  • get_starknet_address: a getter in Kakarot that returns the Starknet address associated with something. The report treats it as harmless, because it only reads.
  • Reentrancy: when a program is called again from inside its own execution, before the first run has finished. If the first run has not yet saved its results, the second run can see or act on half-finished data. The classic everyday comparison is a withdrawal function that pays out before it updates the balance: call it again mid-payout and it pays twice.
  • Check-effect-interaction pattern: a coding discipline. First check the conditions (for example, that the caller has enough balance), then apply the effects (update the balance), and only then interact with the outside world (send the money). Following the order means an outside call cannot catch you with your books half-written.
  • Cached data: values kept in memory during execution instead of being written to permanent storage immediately. Fast, but if someone re-enters before the write, they see the old, in-memory version.
  • Starknet.commit: the step where Kakarot writes the results of an execution to Starknet. The report says Kakarot does this at the very end, which is exactly the situation the check-effect-interaction pattern warns about.
  • Signed transaction: a transaction bundled together with a cryptographic signature proving the sender authorised it. It is like a signed cheque: it can be handed around, but only the signer's authority makes it valid.
  • Front running: spotting a transaction that is about to be processed and getting your own transaction in ahead of it. Like posting your letter first so it is read before someone else's.
  • Whitelist: an explicit list of things that are allowed. Anything not on the list is refused. Here, only whitelisted contracts can reach the guarded function.
  • Precompile: a built-in helper function that a blockchain engine offers to programs, implemented natively rather than as an ordinary contract. The cairo_precompile is the helper that lets Kakarot code call out to Cairo/Starknet.
  • eth_call: a Kakarot function that performs an Ethereum-style call. The fix moves the reentrancy check here.
  • PR (pull request): a proposed change to a codebase, reviewed before it is merged. PR 1582 is where Kakarot made the fix.
  • Severity: how serious a finding is judged to be. Medium sits between low and high.

The code under review

The report shows the guard inside execute_starknet_call. This function is the doorway through which the Kakarot EVM can make a call out to Starknet. The guard exists to stop such a call from coming straight back into the Kakarot EVM.

Text
File: account_contract.cairo
332: @external
333: func execute_starknet_call{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}(
334:     to: felt, function_selector: felt, calldata_len: felt, calldata: felt*
335: ) -> (retdata_len: felt, retdata: felt*, success: felt) {
336:     Ownable.assert_only_owner();
337:     let (kakarot_address) = Ownable.owner();
338:     let is_get_starknet_address = Helpers.is_zero(
339:         GET_STARKNET_ADDRESS_SELECTOR - function_selector
340:     );
341:     let is_kakarot = Helpers.is_zero(kakarot_address - to);
342:     tempvar is_forbidden = is_kakarot * (1 - is_get_starknet_address);
343:     if (is_forbidden != FALSE) {
344:         let (error_len, error) = Errors.kakarotReentrancy();
345:         return (error_len, error, FALSE);
346:     }
347:     let (retdata_len, retdata) = call_contract(to, function_selector, calldata_len, calldata);
348:     return (retdata_len, retdata, TRUE);
349: }
350:

Line by line, in plain words:

  1. Line 332, @external: a label saying this function can be called from outside the contract. It is a public door, not an internal helper.
  2. Line 333, the function signature: execute_starknet_call takes some hidden plumbing (syscall_ptr, pedersen_ptr, range_check_ptr, which are Cairo's internal bookkeeping handles) and returns three things: the length of the returned data, the returned data itself, and a success flag.
  3. Line 334, the inputs: to is the destination address, function_selector is the numeric fingerprint of the function being called, calldata_len is how many items of input there are, and calldata is the input itself.
  4. Line 336, Ownable.assert_only_owner(): the first thing the function does is refuse anyone who is not the owner. This is the access control, the bouncer at the door.
  5. Line 337, Ownable.owner(): it reads the owner's address and stores it as kakarot_address. In this setup the owner is Kakarot itself, so this is Kakarot's address.
  6. Lines 338 to 340: it subtracts the incoming function_selector from the known GET_STARKNET_ADDRESS_SELECTOR and checks whether the result is zero. If the two are equal, the subtraction gives zero, so is_get_starknet_address becomes true. In other words: "is the caller asking for the harmless getter?"
  7. Line 341: the same trick with addresses. It subtracts to from kakarot_address and checks for zero. If they are equal, is_kakarot is true: "is the destination Kakarot itself?"
  8. Line 342: is_forbidden = is_kakarot * (1 - is_get_starknet_address). Multiplying booleans works like AND, and 1 - x flips a boolean. So the result is true only when the destination is Kakarot AND the selector is not the getter. That is the single combination the guard blocks.
  9. Lines 343 to 346: if the combination is forbidden, it builds a kakarotReentrancy error and returns it with FALSE as the success flag. The call never happens.
  10. Line 347: otherwise, it performs the actual call with call_contract(to, function_selector, calldata_len, calldata). This is the moment the request leaves for Starknet.
  11. Line 348: it returns whatever came back, with TRUE for success.

The important observation is what the guard does not cover. It only inspects the immediate destination and selector. A call aimed at an account_contract rather than at Kakarot's own address makes is_kakarot false, so is_forbidden is false, and the call goes through.

How the bypass works

The researcher's point is that the account_contract could call itself, or another account_contract, carrying a signed transaction. That path re-enters the Kakarot EVM without ever targeting Kakarot's address with a forbidden selector, so the guard never fires. The report describes the EVM as extremely vulnerable to reentrancy because of its extensive use of cached data.

No concrete request, payload or command appears in the report. It describes the mechanism rather than a worked exploit, so the steps below are the mechanism, not a recipe with URLs.

Step 1: reach execute_starknet_call

The call has to come from a whitelisted contract, because execute_starknet_call is accessible only via whitelisted contracts. The only way to access execute_starknet_call is through the cairo_precompile, which is itself whitelisted. This step matters because it is the barrier that keeps the likelihood low: without a place on the list, there is no way to knock on this door at all.

Step 2: call an account_contract instead of Kakarot

Instead of aiming at Kakarot's address with a forbidden selector, the attacker aims at an account_contract, its own or another one, together with a signed transaction. Because the destination is not Kakarot's address, is_kakarot is false, is_forbidden is false, and call_contract executes. This step matters because it is the whole bypass: the guard is looking at the wrong thing.

Step 3: re-enter the EVM

The signed transaction submitted in step 2 re-enters the Kakarot EVM. Kakarot stores the effects of execution at the very end, via Starknet.commit, so it openly does not follow the check-effect-interaction pattern. During the re-entry the EVM's state is therefore not yet committed, and the integrity of the EVM is at risk. This step matters because it explains the damage: the second entry sees data that the first entry has not finished writing.

Why the guard failed

The guard in execute_starknet_call is scoped to a single destination and selector pair: Kakarot's address with anything other than get_starknet_address. It does not account for the account_contract calling itself or another account_contract with a signed transaction, which is a second way back into the EVM.

The underlying weakness is that Kakarot commits its execution effects only at the very end through Starknet.commit, so it does not follow check-effect-interaction and cached data is live during a nested call. The existing defence did not stop this because it only inspects the immediate destination and selector of the Starknet call; a call to an account_contract satisfies neither forbidden condition. The likelihood is kept low by whitelisting, not by the check itself.

Impact and the discussion around it

The researcher states that an exploit via this path can have critical impact on the integrity of the EVM, but that its likelihood is extremely low because execute_starknet_call is accessible only via whitelisted contracts.

The Kakarot team's first response rated it Medium and explained the practical route: re-entrancy is possible if the attacker possesses the signed transaction before it is executed and can front run it to store it in Starknet before it is processed. They called this possible but very unlikely, and said they would move the reentrancy check to the Kakarot contract level.

A later comment from the team argued that whitelisting makes exploitation impossible: the only way to reach execute_starknet_call is through the whitelisted cairo_precompile, and at the specified commit for the audit only the DualVMToken contract was whitelisted, which cannot lead to the exploit. They still committed to the mitigation.

The judge was not willing to accept that whitelisting makes the issue impossible to exploit and kept it at Medium, stating that reentrancy is no joke and a hand wavy hypothetical is enough in this case. When asked whether the whitelisting requirement places it under centralisation risks, the judge answered that it does not in this case, because the potential for damage was enough to keep it as a medium.

The fix

The recommended mitigation was to remove the reentrancy check in account_contract and add a reentrancy guard on the Kakarot.eth_call function. Kakarot implemented this: in PR 1582 the reentrancy check is moved to the Kakarot level in eth_call. The mitigation was confirmed.

Why this helps: instead of guarding one narrow doorway deep inside the system, the check now sits at the entry point that owns the state. Any route that comes back in has to pass through eth_call, so the guard sees it regardless of which contract the call was aimed at.

Variants to test

If you are learning to look for this kind of bug, these are the patterns to keep in mind:

  • Look for guards that compare only a destination address and a selector, as here. A positive result is a call path that reaches the same sensitive component through a different contract (a sibling instance, a proxy, or the calling contract itself) without matching the forbidden pair.
  • Look for state that is committed only at the end of execution, such as a single final commit call. A positive result is a nested call that observes or acts on cached, not-yet-committed state.
  • Look for access control that relies on a whitelist as the only barrier to a reentrancy path. A positive result is any whitelisted contract whose reachable functions can be composed into the nested call.
  • Look for signed transactions that can be submitted ahead of execution. A positive result is the ability to store a signed transaction before it is processed and have it executed inside a nested call.

Hunting notes

This kind of bug hides where a reentrancy guard is written narrowly around one destination and selector rather than around the entry point that owns the state. During recon, the signals are a guard that enumerates allowed selectors, a single commit at the end of execution instead of check-effect-interaction, and a whitelist that is the only thing standing between an external caller and the guarded function.

The researcher named the bypass (calling an account_contract with a signed transaction) and tied it to the EVM's use of cached data and its end-of-execution commit. The program accepted it at Medium even though the team argued whitelisting made it unexploitable, because the judge treated the potential for damage as sufficient.

Glossary

  • Address: the identifier of a contract or account on a blockchain, like a street address for a call.
  • Blockchain: a shared record book kept by many computers, where past entries cannot be quietly changed.
  • Cached data: values held in memory during execution rather than written to permanent storage straight away.
  • Check-effect-interaction pattern: a coding order: check conditions, then update state, then talk to the outside world, so an outside call cannot catch you mid-update.
  • cairo_precompile: the built-in helper that lets Kakarot code call out to Cairo/Starknet; it is whitelisted.
  • eth_call: a Kakarot function that performs an Ethereum-style call; the fix moves the reentrancy check here.
  • EVM (Ethereum Virtual Machine): the standard engine that runs Ethereum programs.
  • Front running: getting your own transaction processed ahead of one you know is coming.
  • Function: a named block of code that does one job when called.
  • Function selector: a short numeric fingerprint identifying which function of a contract you want to call.
  • Getter: a function that only reads and returns a value, changing nothing.
  • get_starknet_address: a harmless getter in Kakarot that returns a Starknet address; the guard allows calls to it.
  • Kakarot: an EVM implementation running on Starknet, translating Ethereum-style programs to Starknet.
  • PR (pull request): a proposed change to a codebase, reviewed before merging; PR 1582 carries the fix.
  • Precompile: a built-in helper function offered natively by a blockchain engine.
  • Reentrancy: a program being called again from inside its own execution before the first run has finished, so the second run can see half-finished data.
  • Severity: how serious a finding is judged to be; Medium sits between low and high.
  • Signed transaction: a transaction bundled with a cryptographic signature proving the sender authorised it.
  • Smart contract: a small program living on a blockchain that runs automatically when called.
  • Starknet: a blockchain with its own engine and its own language, Cairo.
  • Starknet.commit: the step where Kakarot writes execution results to Starknet; the report says it happens at the very end.
  • Whitelist: an explicit list of allowed things; anything not on it is refused.
  • account_contract: the Kakarot component in Cairo that holds the reentrancy check in execute_starknet_call.
  • execute_starknet_call: the function through which the Kakarot EVM makes a call out to Starknet, guarded by the check under review.

More by RadiantLabs

View all

17 more disclosed reports, best first.

More from Kakarot

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.