diff --git a/protocols/bgp/packet/path_attributes_test.go b/protocols/bgp/packet/path_attributes_test.go
index 606ee24c44b760292f155b3bc794e1424a92c803..14ce9c202f92afd1c16a8da26b0f919756c9158f 100644
--- a/protocols/bgp/packet/path_attributes_test.go
+++ b/protocols/bgp/packet/path_attributes_test.go
@@ -968,6 +968,17 @@ func TestDecodeMultiProtocolReachNLRI(t *testing.T) {
 				},
 			},
 		},
+		{
+			name: "MP_REACH_NLRI with invalid prefixes",
+			input: []byte{
+				0x00, 0x02, // AFI
+				0x01,                                                                                                 // SAFI
+				0x10, 0x20, 0x01, 0x06, 0x78, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // NextHop
+				0x00,             // RESERVED
+				0x30, 0x26, 0x00, // Prefix
+			},
+			wantFail: true,
+		},
 	}
 
 	t.Parallel()
@@ -1039,6 +1050,15 @@ func TestDecodeMultiProtocolUnreachNLRI(t *testing.T) {
 			},
 			wantFail: true,
 		},
+		{
+			name: "MP_REACH_NLRI with invalid prefixes",
+			input: []byte{
+				0x00, 0x02, // AFI
+				0x01,                   // SAFI
+				0x2c, 0x26, 0x20, 0x01, // Prefix
+			},
+			wantFail: true,
+		},
 	}
 
 	t.Parallel()