DSS

DSS 2026 / Day 1 / Amber Hall

Security improvements and operational lessons from py-libp2p and Py-IPFS-lite

Sumanjeet

5:44 · Recording

Watch on YouTube ↗Open recording viewerOriginal programme entry
Download plain textDownload timestamped JSON

Source: YouTube automatic caption track · Exported 2026-11-16. Timestamps link to the source video. Cue end times were not supplied.

Transcript

0:06Hello everyone.

0:08My name is Sumanjit and I am an open

0:10source developer from India.

0:13Currently I am the maintainer of

0:14PylibP2P which is a Python

0:16implementation of libp2p and I am also a

0:19maintainer of unified testing where we

0:22do all kind of interrupt testing between

0:25different libp2p implementations.

0:28Recently I was auditing the security

0:30layer of Python libp2p and there I have

0:33found some of the security gaps and

0:36today I want to share about those

0:37security gaps with you. What was the

0:40gaps, how we have fixed it and what

0:43lessons we have learned from them.

0:48So for all the people new to libp2p

0:51libp2p is an open source project which

0:54is used to create peer-to-peer

0:56applications. Every peer has a unique

0:59identity called peer ID

1:01and the peer ID is derived from the

1:04public key of that peer.

1:06And libp2p allows these peers to

1:09discover each other and create

1:12connections with each other and along

1:14with that there are some security

1:16protocols like TLS using which these

1:19peers can create secure connections.

1:24So while auditing the security layer I

1:26have found that these are the three

1:28issues where I have found the same

1:31pattern. We are not correctly verifying

1:34some of the certificates due to which we

1:37are getting some of the security gaps.

1:39So the first security issue was related

1:42to quick module where we are not

1:45correctly verifying the remote peer's

1:48certificate. So that's why we can have a

1:51connection from remote peer even without

1:54that peer is correctly giving a

1:56certificate.

1:57The second issue was in TLS module.

2:00There also we are getting some inbound

2:02connections and even if they are not

2:04giving us certificate, then also we are

2:07accepting this connection.

2:10Third issue was in peer records where we

2:13are not verifying the signed peer

2:15identity. Like we are not verifying who

2:18has correctly signed that certificate.

2:22The peer records issue is more

2:25important. So what is a peer record?

2:28A peer record is an identity or better

2:31to say it is an signed identity of a

2:34peer. It also contains the address on

2:37which that peer can be connected. So it

2:39is a very important thing. So if we are

2:42not correctly verifying who has signed

2:45the identity or the peer record, then we

2:48are storing this peer record in our

2:51routing table. So if we store this peer

2:55record in our routing table without

2:56verifying, what things can go wrong?

2:59Okay. We can have wrong address of other

3:02peers inside our routing table. So our

3:05node can become isolated from the entire

3:07network. We might be connecting to

3:10different peers and we will think that

3:12okay, we have connected to the correct

3:14peer. So we always have to

3:18verify before storing any kind of peer

3:21records.

3:22And if we are not doing this, then we

3:25are isolating our our peer from rest of

3:29the networks.

3:33Okay. So there are some places or there

3:35are sometimes when we have one

3:37specifications and we have to create

3:40different implementations out of it.

3:42Talking about the libp2p, we have one

3:45specifications of libp2p and we have to

3:48create different implementations of it

3:50for different use cases. Like we have

3:53rust libp2p, Go libp2p and all other

3:57kind of implementations like Python

3:59libp2p.

4:00So where

4:01we have to verify that whether they are

4:04able to talk with each other

4:07each other or not.

4:08Even if we are able to create different

4:11implementations of libp2p, it will not

4:14verify that whether all the

4:16implementations are verifying the

4:20nodes identity or not. Just imagining a

4:24situation where we have two different

4:26implementations. One is Python libp2p

4:29and one is Go libp2p.

4:31So they may be interoperable. They may

4:33be able to communicate with each other,

4:35but then also it is not confirmed that

4:38whether both of them are doing the same

4:42security checks or not. So we have to do

4:45a deep analysis of each of the

4:47implementations that whether they are

4:50doing the right security checks or not.

4:55So

4:56these are the four PRs which we have

4:58merged for fixing all the security

5:01issues security issues. The first one

5:04was quick, then TLS, then peer store,

5:07and there was one more security issue

5:09which was related to circuit relay.

5:13So we have got some more issues like the

5:17four GitHub advisory we have got. We are

5:20working on it and we will fix it soon.

5:22For anyone working on

5:24decentralized systems or anyone creating

5:27some more applications, I just want to

5:30say that before negotiating on any of

5:32the application level protocols, you

5:35must verify whether the remote peers

5:38identity is correct or not.

5:40Okay. Thank you.

Source and accuracy details

Source export SHA256: 61e1e165ba08404e6bcac3f5e2468d5ad4e5edb42b02d70dcc16ad2cbf553458