Blog

Safe Wallet Upgradeability Risks: When Safe Contracts Evolve, How Do Existing Treasuries Stay Secure?

A DAO treasury holding millions in assets operates through a Safe Wallet multisig contract. That contract was deployed months ago under a specific code version, with defined signer thresholds and approval logic. Then the Safe development team releases a new version with additional features, gas optimizations, or security patches. The question facing the DAO leadership is immediate: should we upgrade our contract, and if we do, what control do we actually retain over that decision?

The technical answer involves a proxy architecture that allows contract logic to be updated without changing the wallet’s address or asset storage. The practical answer is more complicated. An upgrade can improve security or introduce hidden risks depending on how the proxy mechanism works, who controls the upgrade process, and whether signers can actually prevent an unwanted upgrade. For organizations managing significant assets, the difference between theoretical control and enforced control over contract evolution can determine whether a treasury remains secure or becomes vulnerable to governance capture.

Safe Wallet proxy architecture diagram showing the relationship between proxy contract, implementation versions, and signer approval flow

How Safe Wallet’s proxy architecture works

Safe Wallet uses a proxy contract pattern, where the wallet address itself is a proxy that delegates execution to a separate implementation contract. The proxy holds all assets and stores user data, while the implementation contains the transaction logic, signature verification, and execution code. When an upgrade occurs, the implementation address is changed, but the proxy address remains the same. This means users and external services never need to move funds or update integrations when Safe releases a new version.

The mechanism relies on a special Ethereum instruction called DELEGATECALL, which executes code at a separate address while maintaining the storage context of the calling contract. In practical terms, when a transaction is submitted to a Safe Wallet, the proxy contract delegates the execution to the current implementation contract. If that implementation is updated to version 1.4.0, the same proxy address now routes calls to the new code, but the stored signatures, signer list, and transaction queue remain untouched.

This design solves a critical problem: without proxies, every upgrade would require moving all assets to a new contract address, a risky and expensive process that could introduce human error. With proxies, upgrades happen atomically and without asset movement. However, the design creates a secondary question: who decides when and how the implementation address changes? If that decision is centralized or can be made unilaterally, the upgrade mechanism becomes a potential attack vector, regardless of how well-designed the new code is.

Safe Wallet’s upgrade governance typically depends on how each Safe instance is configured. Some Safes are controlled entirely by their signers through the multisig process itself. Others may have set an “Owner” address or “Guard” contract that can propose or approve upgrades outside the normal signer threshold. This configuration choice is made at deployment and determines whether an upgrade requires the same consensus as spending funds.

Why upgrades can bypass normal multisig requirements

The critical risk is that an upgrade mechanism can be designed with different authorization requirements than transaction approvals. For example, a Safe might require 5 of 7 signers to approve a fund transfer, but only 2 of 7 to approve an upgrade. Alternatively, an upgrade might be triggered by a “Module” contract that is not part of the main signer set, or by an external “Owner” address set during deployment. In these scenarios, the people who can change how the Safe functions are not the same people who can spend its funds. That asymmetry is where governance capture becomes possible.

A Module in Safe Wallet terminology is a separate contract that can be added to a Safe to extend its functionality. Once enabled, a Module can execute transactions without requiring signer approval in the normal way. If a Module is set up with low access controls or if its authorization logic has a flaw, it could potentially modify the Safe’s implementation address. The Module was originally intended to enable features like transaction batching, spending limits, or subscription payments, but a poorly designed or intentionally malicious Module could become a backdoor.

Similarly, during the initial Safe deployment, a team might set themselves as the “Owner” to retain upgrade rights. The Owner address might be a multisig wallet controlled by the Safe development team or a governance token voting system. If that Owner changes the implementation contract to a version that allows arbitrary fund transfers, the original signers would not be able to stop it. They would discover the change only after it was executed, when they attempt to initiate a transaction and find that their signatures no longer work or that the execution logic has changed.

Some Safe instances use a “Delay Module” that imposes a time window between when an upgrade is initiated and when it actually takes effect. This gives signers a chance to react if an unwanted upgrade is detected. However, if the Delay Module itself can be disabled without the same approval threshold, the protection is illusory. The real security question is whether the mechanism that approves upgrades can be altered or disabled more easily than it can be used for its intended purpose.

Storage layout conflicts and logic corruption risks

Even when upgrade governance is properly secured, the technical implementation of upgrades introduces subtle risks. Ethereum’s smart contracts store data in “storage slots”—specific memory locations in the blockchain. When a new implementation contract is deployed, it must respect the same storage layout that the proxy used in its previous version. If a developer accidentally changes the storage slot assignments, reorders variables, or removes fields, the new implementation will read garbage data from the old storage locations.

For example, if version 1.3.0 stores a nonce counter at slot 0 and a signer list at slots 1–10, then version 1.4.0 must do the same. If version 1.4.0 accidentally stores a different variable at slot 0, all transaction counting becomes corrupted. Transactions might appear to be signed when they are not, or legitimate transactions might be rejected as duplicates. The proxy itself remains functional—it still delegates correctly—but the application logic running inside it produces wrong results.

The Safe development team has published storage layout documentation and uses automated testing to catch these errors, but any third-party contract extending Safe Wallet (such as custom Modules or Guard contracts) could introduce corruption if not carefully reviewed. This is especially relevant for organizations that deploy custom upgrades or modules designed by less experienced developers. The risk is not that the Safe team will intentionally corrupt storage, but that an upgrade could be released with a genuine implementation error that breaks signature verification, approval tracking, or fund access.

A related concern is that the implementation contract code itself might have vulnerabilities that are only discovered after deployment. If a bug in transaction execution or signature validation exists in version 1.4.0 but was not present in version 1.3.0, an upgrade could actually reduce security. This is why many organizations that manage large treasuries take time to audit new Safe versions before upgrading, even though the upgrade process itself is technically straightforward.

Governance capture through incremental, plausible upgrades

The most dangerous upgrade scenario is not a sudden, obvious attack. It is a series of small, defensible changes that cumulatively shift control away from signers. Consider a hypothetical sequence: version 1.4.1 adds a new “Emergency Recovery” feature that allows the contract to recover funds if a certain fraction of signers become unavailable. Version 1.4.2 improves gas efficiency by changing how approval signatures are processed. Version 1.4.3 adds support for a new token standard. Each individual change might be reasonable, but version 1.5.0 could introduce logic that allows the Emergency Recovery feature to be triggered by a broader set of parties than originally intended, or that reduces the multisig threshold required to activate it.

A sophisticated attacker controlling the upgrade mechanism would present each step as an incremental improvement or necessary security fix. Signers might approve individual upgrades without recognizing the cumulative effect. By the time the DAO realizes that its governance has been eroded, the implementation contract contains subtle authorization bypasses or logic flaws that are difficult to detect without deep code review.

This risk is amplified when signers are distributed across different organizations or when some signers are inactive. If a DAO has 7 signers but only 2 are routinely paying attention to contract changes, those 2 signers might not be able to block an upgrade they disapprove of if the upgrade governance is set to 3 of 7 approval. The gap between the amount of consensus required for spending and the amount required for upgrades can be exploited by anyone who controls the upgrade mechanism.

A defense against this scenario is to establish a robust upgrade review process independent of the upgrade governance mechanism itself. Before approving an upgrade, signers should conduct a comparative code review, check that storage layout has not changed, verify that new authorization patterns have not been introduced, and run the Safe on a test network with representative transactions. Some organizations hire external auditors to review Safe upgrades before deployment, though this adds cost and time to the process.

The alignment between signer control and upgrade authority

The safest Safe Wallet configuration is one where the same signers who control fund transfers also control upgrades, and where the approval threshold is identical. This ensures that no one can unilaterally change the contract logic without the same consensus required to move assets. On the official Safe Wallet site, organizations can review how their Safe is configured and audit which addresses hold upgrade authority.

However, many existing Safes were deployed under different governance models. A DAO that used an early version of Safe Wallet might have delegated upgrade authority to a separate governance token voting system, while transaction approvals remain with a smaller multisig. Changing this configuration now requires an upgrade, which circles back to the governance capture problem: if the current upgrade mechanism is misaligned with signer control, a corrective upgrade might need to be approved by the very actors who benefit from the misalignment.

The practical recourse is to understand the status quo and evaluate its actual risk. If a Safe has a higher upgrade threshold than a spending threshold, the risk is real but depends on whether the actors controlling the lower threshold have incentives to attack. If the Safe is controlled by a decentralized DAO where all participants are economically aligned, the risk might be acceptable. If the Safe is controlled by a team with internal conflicts or if it holds assets claimed by multiple parties, the risk is higher.

Some organizations use a multisig security model that adds layers to this decision. They might maintain a “cold” multisig controlled by trusted senior members that approves both spending and upgrades, and a separate “hot” multisig for routine transactions below a threshold. The cold multisig acts as a final check, ensuring that no upgrade can happen without explicit approval from the most security-conscious signers. This approach increases friction but reduces the window for governance capture.

Detecting unwanted upgrades and responding to them

Once an upgrade has been executed, detecting it requires monitoring the Safe’s implementation address and comparing the code at that address to previously known versions. Tools like Etherscan and specialized contract analysis platforms can show when the implementation address changes and allow direct comparison of the old and new bytecode. However, many signers do not routinely monitor their Safe’s contract address, and the upgrade might not be noticed until it causes operational issues.

The response time available depends on the upgrade governance mechanism. If the Safe includes a Delay Module, there is a window between when an upgrade is initiated and when it takes effect. During that window, signers who detect the unwanted upgrade can take action: they can enable a “Guard” contract that blocks the upgrade, they can attempt to change the Safe’s authorization rules if they still have that capability, or they can transfer assets to a new, safer Safe contract.

If the upgrade is already executed and no delay mechanism was in place, the options are more limited. Signers can attempt to execute a transaction to revert the implementation address back to the previous version, but only if the new implementation still respects the stored approval logic and signer list. If the new implementation contains code that prevents reversion or that corrupts the signer list, the Safe might be locked indefinitely with no way to access its funds except through a legal claim or negotiation with whoever controls the new implementation.

This is why many organizations make the decision to remain on an older Safe version indefinitely, accepting foregone improvements in exchange for reduced upgrade risk. The tradeoff is worth making for treasuries where security is the dominant concern and where the Safe’s current functionality is sufficient. The risk of a future unknown vulnerability in the outdated version must be weighed against the risk of governance capture through upgrades.

Practical governance structures to mitigate upgrade risk

Organizations managing large treasuries through Safe Wallet can implement several concrete measures to reduce upgrade risk. First, establish an explicit upgrade policy that specifies which versions are approved, which features are required, and which changes would trigger a rejection or migration to a new Safe. Publish this policy on-chain if possible, or in a governance forum that creates a public record signers can reference.

Second, separate upgrade approval from spending approval if the organization is large enough. Create a sub-multisig of trusted technical members whose only responsibility is evaluating contract changes. This sub-multisig does not move funds, but it can veto any upgrade that does not meet the organization’s security standards. If this veto multisig is required to approve upgrades, then an attacker would need to compromise multiple governance layers simultaneously.

Third, maintain a “circuit breaker” Safe that holds nothing but is authorized to block upgrades or drain the main Safe if it detects an unsafe contract change. This secondary Safe acts as insurance, activated only if the primary governance structure fails. The circuit breaker requires a separate set of signers and a clear operational playbook so that it can be invoked quickly if needed.

Fourth, schedule regular audits of the Safe’s configuration and implementation address. At least quarterly, verify that the implementation address still points to the expected version, that no unauthorized Modules have been added, and that the signer list and approval thresholds have not changed. For very large treasuries, maintain a historical record of all configuration changes and review them against the organization’s upgrade policy.

The unresolved tension between upgradability and immutability

Safe Wallet was designed with the assumption that upgradability is desirable—that contracts should be able to evolve, improve, and fix bugs without losing their identity. This is sensible for most applications, where users can migrate to new versions and the consequences of an upgrade gone wrong affect only voluntary participants. For a DAO treasury, the stakes are different. An upgrade that goes wrong can lock assets away permanently or enable theft by whoever controls the upgrade mechanism.

Some organizations have responded by creating Safes that are intentionally immutable: they disable the upgrade mechanism entirely by removing all upgrade authority and ensuring that no Module can modify the implementation address. This approach eliminates the upgrade risk entirely but also means that the Safe cannot benefit from future security improvements or bug fixes. It is a valid choice for organizations that prioritize stability and believe that the current Safe version is trustworthy enough for long-term use.

The tension between upgradability and immutability reflects a fundamental trade-off in Web3 security. Flexible systems enable rapid improvement but create governance capture risks. Rigid systems prevent tampering but leave organizations exposed to discovered vulnerabilities that cannot be patched. The right choice depends on the specific context: the value of the treasury, the trust level of the signers, the organization’s technical sophistication, and the acceptance of risk.

For organizations that choose to allow upgrades, the critical practice is making that decision consciously and explicitly. Upgrades should not be automatic or assumed to be safe merely because the Safe development team recommends them. Each upgrade should be treated as a governance decision requiring the same rigor as a major strategic choice. When signers understand that an upgrade is a form of contract governance—not simply a software update—they are more likely to maintain the vigilance necessary to detect and prevent abuse.

Frequently asked questions

Can a Safe Wallet be upgraded without signer approval?

It depends on how the Safe is configured. If upgrade authority is aligned with the multisig signers and requires the same approval threshold as spending, then no upgrade can occur without signer consensus. However, if the Safe was deployed with upgrade authority delegated to a separate Owner address, Module, or lower approval threshold, upgrades can be executed without full signer approval. Organizations should audit their Safe’s configuration to verify alignment between spending and upgrade authority.

What happens to assets if a Safe Wallet upgrade corrupts the storage layout?

The assets themselves remain on the blockchain at the proxy contract address, but they may become inaccessible if the new implementation cannot correctly parse the stored data. Signers might be able to revert the implementation address to a previous version if the new code respects the signer list, or they may need to migrate assets to a new Safe. This is why upgrades should be tested on a testnet and audited before deployment to production.

Is it better to never upgrade a Safe Wallet?

Not necessarily. Upgrades can fix genuine security vulnerabilities and add useful features. The key is to make upgrading a deliberate governance decision rather than an automatic process. Organizations should establish an upgrade policy, conduct code review before each upgrade, and maintain the ability to detect and block unwanted upgrades. For very large treasuries, hiring external auditors to review Safe upgrades can be a worthwhile investment.

Leave a Reply

Your email address will not be published. Required fields are marked *