DSS 2026 — Every Safe Is Blind to Its Own Backdoor: Scanning 2M+ Multisigs for Shadows Elliot Friedman Source video: https://www.youtube.com/watch?v=lPF2qHaRwe4 Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: 046e44d927488eab302f4213a7d279778d4de10b48e920467653bfe1d9b877bb [0:00] Hello everyone. I am Elliot Friedman, [0:03] the founder of Solidity Labs. [0:05] We're an on-chain engineering team where [0:07] we embed with protocol teams to build [0:10] and secure smart contracts. [0:13] I'm also a seal member and help with the [0:15] framework around custody. And today, [0:19] we're going to be talking about scanning [0:23] 12 million multisigs for shadow owners [0:26] and modules because Gnosis Safes are the [0:30] uh [0:31] largest and most widely adopted uh [0:34] wallet with the the largest uh AUM. [0:38] And so let's dive in. [0:41] We're going to start here asking a [0:42] question. [0:43] What's the difference between these two [0:47] Gnosis Safes? [0:49] So on the left we can see one has no [0:51] pending transactions. On the right we [0:53] can see there's some pending [0:54] transactions that have been [0:56] removed. [0:58] Does anyone notice a difference? [1:03] So if you said there is no difference, [1:05] um you got the question right, but one [1:08] of those Safes has a shadow module [1:11] that can steal all of its funds at a [1:13] moment's notice and the other was [1:15] completely fine. [1:18] So we have a paradox here. [1:20] How can an owner both be and not be at [1:23] the same time? [1:25] And we have the same question for a [1:27] module. [1:28] If we made [1:30] two calls to a Safe, we could get [1:33] contradicting answers [1:35] because [1:37] every major interface relies on linked [1:39] list enumeration [1:42] and [1:44] if an item is not in the linked list, it [1:46] means it's not um [1:49] it's not an owner or module. [1:51] But as we can see here with this fun [1:53] little diagram, [1:55] all uh owners or modules in Safe must be [1:59] in a [2:00] linked list [2:01] where we start off at the sentinel. The [2:03] sentinel points to the first address, [2:05] the first address points to the second [2:07] address and so on. And then the last [2:09] address will point back to the sentinel [2:12] address. [2:13] So it's a linked list, it goes in a [2:14] circle. [2:16] But as we can see here, if someone is [2:19] able to write to this mapping outside of [2:22] this circularly linked list, [2:24] now this shadow.eth will be a [2:28] owner. [2:30] And it will not be returned in the get [2:33] owners function and so no interfaces [2:35] will be able to see it. [2:36] We have the same issue with modules [2:38] which are [2:39] arguably more powerful than owners [2:42] because they do not require quorum [2:45] in order to [2:46] actually have a transaction go through. [2:48] And so this brings us to the core [2:50] problem with shadow owners and shadow [2:52] modules, which is that they are [2:55] invisible almost everywhere across the [2:58] ecosystem [3:00] because [3:02] no one bothered with the tooling to [3:04] detect them. [3:05] Um [3:07] and there are some websites about this, [3:08] but [3:09] yes, basically what happens here is we [3:11] have a second owner that exists on [3:14] chain. It's invisible to the safe UI [3:17] and [3:18] there is no uh infrastructure checks for [3:23] for shadows. [3:26] Um [3:27] but we're going to get into uh a site [3:29] that we've built out that helps solve [3:31] this problem. [3:33] So here we have a [3:36] gnosis safe that has a shadow owner. [3:38] We can see here in the owners array it [3:40] has the owner, the sentinel that points [3:42] to the owner that points to the [3:43] sentinel. So it's a nice circularly [3:45] linked list. We go down to check [3:47] addresses, we paste the address in here [3:50] and then it says, you know, this is a [3:52] shadow owner. [3:54] This address is a shadow owner of this [3:56] safe. [3:59] And [4:02] how does it get planted? And why are we [4:04] investigating this today? [4:06] Because this is a known issue that Safe [4:08] can have these shadow owners and shadow [4:10] modules. [4:12] We were building a Safe-based wallet [4:15] and noticed that during the setup [4:17] delegate call window, an attacker could [4:19] inject arbitrary [4:21] uh actions because [4:23] the module setup function [4:26] calls does a delegate call out to the [4:28] target address that's passed. [4:32] And so [4:34] we said, well, wait a second. If you can [4:36] do an arbitrary delegate call during [4:38] initialization, then an attacker could [4:41] quite easily [4:43] get people to set up Safes using some [4:45] malicious way [4:47] and then install a shadow module [4:50] or a series of shadow modules [4:52] in that Safe. [4:55] [snorts] [4:56] And right, you just don't don't write [4:57] into the [4:59] into the circularly linked list, but [5:00] just add into the mapping. This is now [5:03] an owner. [5:04] And we wanted to know, is this [5:06] theoretical or has this attack already [5:08] been planted in the wild? [5:11] Um because if it's theoretical, then [5:14] hey, you know, [5:16] it doesn't really matter. But we haven't [5:18] really seen anyone do a large-scale scan [5:21] of all [5:23] all the Safes that contain most of the [5:25] funds that Safes hold across multiple [5:27] chains and ecosystems. And so we wanted [5:29] to do that. [5:31] Before we get there though, let's talk [5:32] about the CPIMP uh [5:34] attack pattern. CPIMP stands for [5:37] clandestine proxy in the middle of [5:39] proxy. [5:40] And this was a hidden proxy inserted [5:43] uh during proxy initialization [5:46] and it made the proxy be owned by an [5:49] attacker. [5:51] And [5:52] the same thing is kind of true with [5:55] shadow owners and shadow modules because [5:57] you get created by this hidden entry in [5:59] the owner's mapping. [6:00] And both of these attacks, they leave [6:03] surface logic and getters untouched, so [6:06] the smart contracts work exactly as [6:08] intended. [6:09] But both of these things are invisible [6:12] to auditors, Etherscan, Tenderly, [6:16] and basically, you know, the in [6:18] infrastructure that people rely on [6:20] um [6:21] on a on a regular basis to ensure their [6:25] their safes are are secure. [6:28] And [6:28] as a as a category, as a [6:31] crypto really we we under [6:34] underweight um [6:37] under index [6:39] threat models that are persistent [6:42] where an attacker gains access and then [6:44] doesn't use it immediately because we're [6:46] so used to [6:48] instant smash and grab exploits and same [6:50] block chains [6:52] uh in DeFi, but [6:54] I think that this category is [6:57] very very concerning and we should be [6:59] spending more time on on finding [7:03] um and hunting for threat actors that [7:05] are, [7:06] you know, exploiting these kind of [7:08] methods. [7:10] So can we even prove that a shadow [7:13] exists? [7:14] If we have the address of a shadow, [7:17] shadow owner, shadow module, [7:19] we can prove that [7:22] um [7:24] we can prove if it's a shadow or not. We [7:25] can falsify that question. But if we are [7:28] instead [7:30] given um [7:34] if we are instead given a [7:37] arbitrary storage right inside of a safe [7:40] that doesn't do anything that we think [7:42] it should be doing or we don't know what [7:44] it should be doing, [7:45] uh it's actually impossible for us. Even [7:47] if we used and we had all the computing [7:49] power on Earth, [7:51] we wouldn't be able to guess whether or [7:53] not this [7:55] safe was a shadow owner or just some [7:57] arbitrary storage right. [8:00] And that's because you'd have to brute [8:02] force all the Ethereum addresses in [8:03] existence and then check them [8:05] to to if they're either a [8:07] or [8:08] an owner in the safe. [8:14] So how do we detect how did we go about [8:16] detecting shadows? So [8:19] we started off by reading all the public [8:21] state that we could from the safe [8:24] and [8:25] with that state we reconstructed the [8:27] expected storage try. [8:29] We fetched the current storage hash with [8:33] eth get proof [8:34] and then we checked to see if the [8:38] current storage hash from the RBC [8:41] matched the expected [8:44] um that we computed ourselves. [8:46] And a mismatch is going to be imply that [8:49] there's storage that that we don't [8:52] uh that we can't account for which means [8:54] yeah we're probably dealing with a [8:56] shadow. [8:57] So we started off with a script that [8:59] didn't have much state and we quickly [9:02] realized that [9:03] oh actually um [9:06] we're going to need quite a bit more of [9:07] a complex system for this. [9:10] So we started off with [9:12] um we had a lot of false positives [9:14] because of approve hashes and signed [9:16] messages [9:17] because the safe could write these [9:20] into storage and everything would [9:25] check out um in terms of this being a [9:27] legitimate storage right but we had no [9:29] way to account for this. So we had to [9:32] build indexing into our service and [9:34] crawl through the logs [9:35] to find all of the approve hashes and [9:38] and sign messages. [9:40] And then we also found another after we [9:43] we fixed that um set of false positives [9:45] we found another set of uh false [9:47] positive which were pass keys [9:50] which basically we had these account [9:52] extraction wallets on base [9:54] where we configured um [9:59] web off um [10:01] pass keys basically or the owners of the [10:04] safe configure these web off pass keys [10:07] and uh it just made these three [10:10] deterministic storage rights to these [10:12] different addresses and then there was [10:13] different modules and different versions [10:15] of the pass keys that would [10:17] write to different addresses and so we [10:18] had our different slots and so we had to [10:20] go and update our um [10:24] our eliminator service [10:26] and reviewer service to understand this [10:29] behavior so it could um [10:32] clear all of these these false [10:33] positives. [10:35] So this is our funnel on Base. We had [10:38] 60,000 [10:39] um storage root mismatches flagged once [10:43] we had the logic to you know get rid of [10:47] the approve hash [10:49] and pass keys [10:51] um [10:53] that that ended up eliminating uh [10:55] you know most of [10:57] of the of the safes that we found and [10:59] flagged and then we were we ended up [11:02] with [11:03] 12 unexpected uh [11:06] safes [11:08] with with potential shadow [11:11] uh owners or modules [11:13] but these were on you know addresses [11:16] that didn't have enough funds [11:18] um [11:19] to to warrant concern and most of them [11:23] were were unused anyway. [11:25] So these are our results. [11:27] We ended up scanning 12.1 [11:30] million safes across Base, Ethereum, [11:34] Optimism, and Arbitrum [11:36] and [11:38] you know the majority of them ended up [11:40] reconciling against the expected clean [11:43] root which is great [11:45] great news. We don't need to have a seal [11:46] war room. [11:48] Yeah it we we didn't really find [11:51] um evidence of a large-scale shadow [11:54] owner or shadow module [11:56] um [11:57] you know campaign. [12:00] And here we have just a UI, a couple [12:04] screen grabs here. You can see the [12:06] different networks. [12:08] In the future we might add more. [12:10] It'll show you how many safes we've gone [12:12] through, [12:13] what what block we've indexed to, the [12:16] different versions of the safe that we [12:17] covered. [12:19] [snorts] [12:20] Here we have an unexplained storage [12:21] mismatch. We have this route that we [12:23] expected. This is the actual route. [12:26] And there's a little drop down [12:27] explaining, you know, what this could [12:29] be. [12:31] Here we have uh [12:33] a safe that cleared. So hey, we can see, [12:36] you know, we have our linked list here. [12:38] The sentinel goes to, you know, these [12:40] two modules and then it closes and [12:43] there's one owner. [12:44] And so everything kind of [12:46] matched up there. [12:48] Here's another one that's clean. [12:51] Um [12:52] again, that's great news, you know, this [12:54] is how the majority of them came back. [12:57] Here we have a [12:59] shadow safe where we have an owner. [13:02] Goes to the, you know, sentinel to owner [13:04] to sentinel [13:06] uh modules. It says there's no modules, [13:08] but we checked this address and it said, [13:10] hey, this is a shadow. [13:14] So here we can see the [13:17] shadow scan URL. [13:19] And you're able to [13:22] um look through all of the safes of [13:25] version 1. [13:26] 41 and 1.50 [13:29] uh on this site. You can get a real-time [13:31] view of scan progress and flag safe. [13:35] And you can also see, you know, a [13:37] recomputed [13:39] uh storage route locally that gets [13:40] checked against RPC. So you don't need [13:43] to just trust the back end. You you [13:45] actually get that uh in browser. [13:48] So we're going to end with uh [13:50] a little bit of a tip here. If you see a [13:54] safe that has been created [13:56] that you're using and it has an [13:58] unverified delegate call, [14:01] uh if you see that, you should treat [14:03] that as a potential uh full compromise [14:06] [snorts] and immediately contact Seal [14:09] 911 and if funds are in that safe that [14:13] has a potential compromise or a [14:14] potential shadow owner or module, um [14:17] immediately migrate those funds to a new [14:20] safe. [14:23] So yes, stay safe, uh stay in touch. Um [14:27] yeah, this was this was a uh multi-month [14:30] effort to get all of this [14:32] together and so I want to just thank the [14:35] other engineer on the project, Pratik, [14:36] who really [14:37] uh [14:38] stepped in and helped out a lot. So and [14:41] you can follow us more um on Twitter at [14:43] Solidity Labs [14:45] and you can check the site out here. [14:48] Thanks so much.