DSS 2026 — Security improvements and operational lessons from py-libp2p and Py-IPFS-lite Sumanjeet Source video: https://www.youtube.com/watch?v=fKQ8FUnrCaU Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: 61e1e165ba08404e6bcac3f5e2468d5ad4e5edb42b02d70dcc16ad2cbf553458 [0:06] Hello everyone. [0:08] My name is Sumanjit and I am an open [0:10] source developer from India. [0:13] Currently I am the maintainer of [0:14] PylibP2P which is a Python [0:16] implementation of libp2p and I am also a [0:19] maintainer of unified testing where we [0:22] do all kind of interrupt testing between [0:25] different libp2p implementations. [0:28] Recently I was auditing the security [0:30] layer of Python libp2p and there I have [0:33] found some of the security gaps and [0:36] today I want to share about those [0:37] security gaps with you. What was the [0:40] gaps, how we have fixed it and what [0:43] lessons we have learned from them. [0:48] So for all the people new to libp2p [0:51] libp2p is an open source project which [0:54] is used to create peer-to-peer [0:56] applications. Every peer has a unique [0:59] identity called peer ID [1:01] and the peer ID is derived from the [1:04] public key of that peer. [1:06] And libp2p allows these peers to [1:09] discover each other and create [1:12] connections with each other and along [1:14] with that there are some security [1:16] protocols like TLS using which these [1:19] peers can create secure connections. [1:24] So while auditing the security layer I [1:26] have found that these are the three [1:28] issues where I have found the same [1:31] pattern. We are not correctly verifying [1:34] some of the certificates due to which we [1:37] are getting some of the security gaps. [1:39] So the first security issue was related [1:42] to quick module where we are not [1:45] correctly verifying the remote peer's [1:48] certificate. So that's why we can have a [1:51] connection from remote peer even without [1:54] that peer is correctly giving a [1:56] certificate. [1:57] The second issue was in TLS module. [2:00] There also we are getting some inbound [2:02] connections and even if they are not [2:04] giving us certificate, then also we are [2:07] accepting this connection. [2:10] Third issue was in peer records where we [2:13] are not verifying the signed peer [2:15] identity. Like we are not verifying who [2:18] has correctly signed that certificate. [2:22] The peer records issue is more [2:25] important. So what is a peer record? [2:28] A peer record is an identity or better [2:31] to say it is an signed identity of a [2:34] peer. It also contains the address on [2:37] which that peer can be connected. So it [2:39] is a very important thing. So if we are [2:42] not correctly verifying who has signed [2:45] the identity or the peer record, then we [2:48] are storing this peer record in our [2:51] routing table. So if we store this peer [2:55] record in our routing table without [2:56] verifying, what things can go wrong? [2:59] Okay. We can have wrong address of other [3:02] peers inside our routing table. So our [3:05] node can become isolated from the entire [3:07] network. We might be connecting to [3:10] different peers and we will think that [3:12] okay, we have connected to the correct [3:14] peer. So we always have to [3:18] verify before storing any kind of peer [3:21] records. [3:22] And if we are not doing this, then we [3:25] are isolating our our peer from rest of [3:29] the networks. [3:33] Okay. So there are some places or there [3:35] are sometimes when we have one [3:37] specifications and we have to create [3:40] different implementations out of it. [3:42] Talking about the libp2p, we have one [3:45] specifications of libp2p and we have to [3:48] create different implementations of it [3:50] for different use cases. Like we have [3:53] rust libp2p, Go libp2p and all other [3:57] kind of implementations like Python [3:59] libp2p. [4:00] So where [4:01] we have to verify that whether they are [4:04] able to talk with each other [4:07] each other or not. [4:08] Even if we are able to create different [4:11] implementations of libp2p, it will not [4:14] verify that whether all the [4:16] implementations are verifying the [4:20] nodes identity or not. Just imagining a [4:24] situation where we have two different [4:26] implementations. One is Python libp2p [4:29] and one is Go libp2p. [4:31] So they may be interoperable. They may [4:33] be able to communicate with each other, [4:35] but then also it is not confirmed that [4:38] whether both of them are doing the same [4:42] security checks or not. So we have to do [4:45] a deep analysis of each of the [4:47] implementations that whether they are [4:50] doing the right security checks or not. [4:55] So [4:56] these are the four PRs which we have [4:58] merged for fixing all the security [5:01] issues security issues. The first one [5:04] was quick, then TLS, then peer store, [5:07] and there was one more security issue [5:09] which was related to circuit relay. [5:13] So we have got some more issues like the [5:17] four GitHub advisory we have got. We are [5:20] working on it and we will fix it soon. [5:22] For anyone working on [5:24] decentralized systems or anyone creating [5:27] some more applications, I just want to [5:30] say that before negotiating on any of [5:32] the application level protocols, you [5:35] must verify whether the remote peers [5:38] identity is correct or not. [5:40] Okay. Thank you.