Repository navigation
Conversation
… DataEdge Signed-off-by: Tomás Migone <tomas@thegraph.foundation>
tmigone
added this pull request to stack #675
October 15, 2026 19:03
Collaborator
|
Thanks @tmigone, confirmed on our side, and a really clear write-up. Here's the plan to get this merged and shipped, so it lives in one place. This stays your PR. I'll review and handle the deploy steps that need infra access. Production impact: we checked every write ever made to the production DataEdge (1,321 logs, the contract's full history). Each one came through the EntryPoint from the account named as the owner, with no cross-owner writes. Production is also still pre-launch, so everything on-chain there is our own test data. That simplifies this a lot. We don't need to carry existing facts over, so V2 can be a clean break: a new subgraph that indexes only V2 from its deploy block, with no legacy data source and no Before merge (you)
Deploy sequence (me, after merge)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Anyone can currently overwrite, tombstone or reassign any user's memories: take a fact id from the public subgraph, call the
DataEdgecontract directly with that id and someone else's address, and the subgraph accepts it — theDataEdgecontract emits only the payload and not the caller, so ownership is whatever the payload claims.This PR adds
EventfulDataEdgeV2, which emitsmsg.sender, and a subgraph that takes each fact's owner from the sender and rejects writes to facts owned by someone else. A second legacy data source keeps existing facts readable and unchanged; clients need no change.Warning
Not deployed. The V2 contract addresses, start blocks, and the legacy
endBlockare placeholders; the subgraph protects nothing until the contract is deployed and the staging exploit-replay E2E passes.Verification
The vulnerability was reproduced on staging (Gnosis chain 100), DataEdge
0xE7a4D2677B686e13775Ba9092631089e35F0BB91, fact idaudit-11-bb3eadb2:0x24039B90C7Dacda99e8935C7C423112dCedDe7C3) wrote the fact — tx0xeac1688cb12475b7b876cb3108a71d008fa8d93c7a15538fd0ad13da8304da550xE8020eb0fa58828C35d33242FBf1E1AC8c36dC8E, unrelated wallet) tombstoned it,isActive → false— tx0x3a8f551f27e38ddfa67255b2a233d62bb325744402f93471664a7ecf59519c46ownerto itself — tx0x73ee61d9fc2da7bdab1fe980a62cb44e0a035393f6cfdcd9018c76d0669be2a2Other checks:
contracts: 41 forge tests pass, including 5 news (sender == caller, distinct senders for the samepayload, permissionless append,receive()emits nothing).subgraph:graph codegen+graph buildpass for both the mainnet and staging manifests (two data sources into one entitystore).
Checklist