The “payload” Field of Transactions in a Block Reveals the Private Data to All Peers
The payload field of transactions in Hyperledger Fabric 2.0 contains the original private data value when a client invokes a function to read private data. All peers in the channel, including non-members of the private data collection, can see the private data by fetching the transaction from the blockchain.
- Disclosed after 7 months
To whom it may concern,
We are a research group conducting research on Hyperledger Fabric 2.0. We find a design flaw about the “payload” field of transactions, which can reveal the Private Data to all peers in one channel.
When a client invokes a function to read the private data, the <key, version> is stored in the read set and the value is returned in the “payload” field of transactions. In the private data related transaction workflow, to avoid revealing private data, only the hash of the read-write set is stored in transactions. However, we find that the “payload” in a transaction holds the original value of the private data. Since all transactions will be bundled into blocks and distributed to all peers in one channel, all peers including private data collection non-member peers can see the private data by fetching the specific transaction. This seriously violates the design principles of the private data collection which is shared by only a subset of peers in one channel.
We test the private data example “marbles02_private” in official documents [1]. In this example, only peer0.org1 is the member of PDC “collectionMarblePrivateDetails”. Peer0.org1 invokes the function readMarblePrivateDetails(). The generated transaction has a “payload” containing the private data {"docType":"marblePrivateDetails","name":"marble1","price":99} and is stored into the blockchain. Peer0.org2 is not the owner of this private data, but can find the actual private data in its local blockchain. Please note that we use the ‘invoke’ CLI, not the ‘query’ CLI.
We recommend that original values of private data should not appear in transactions. More restrictions on “payload” are needed.
References
[1] Hyperledger Fabric Official Docs, Tutorials>> Using Private Data in Fabric, https://hyperledger-fabric.readthedocs.io/en/release-2.0/private_data_tutorial.html?highlight=using%20private%20data
Please let me know if you have any questions or concerns. If you think it is necessary, we can give you a briefing on the issues. Look forward to your reply!
Best Regards,
Shan Wang, Southeast University, University of Massachusetts Lowell , email: [email protected] Yue Zhang, Jinan University, University of Massachusetts Lowell Xinwen Fu, University of Massachusetts Lowell
Impact
This design flaw seriously violates the design principles of the private data collection which is shared by only a subset of peers in one channel.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
All peers in the channel, including those not in the private data collection, can read the private data, violating the collection's design principle.
What the attacker needed
Hyperledger Fabric 2.0 network; private data collection configured; client invokes a read function
The fix
Original values of private data should not appear in transactions; more restrictions on the payload are needed.
How it was found
- Set up the marbles02_private example where only peer0.org1 is a member of the private data collection.
- Have peer0.org1 invoke the readMarblePrivateDetails function using the invoke CLI.
- Observe that the generated transaction's payload contains the private data.
- Check peer0.org2's local blockchain and find the private data even though it is not a collection member.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Hyperledger Fabric is a blockchain system where some data can be kept private to a subset of participants. This report found that when someone reads that private data, the actual value is written into the transaction record that every participant receives, so the privacy is broken.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.