While Israel remained at Shittim, the people began to play the harlot with the daughters of Moab. For they invited the people to the sacrifices of their gods, and the people ate and bowed down to their gods (Numbers 25:1-2).
Then the Lord spoke to Moses, saying, “Be hostile to the Midianites and strike them; for they have been hostile to you with their tricks, with which they have deceived you in the affair of Peor and in the affair of Cozbi, the daughter of the leader of Midian, their sister who was slain on the day of the plague because of Peor.” (Numbers 25:16-18).
Which is it? Moabite women or Midianite women?
Actually, it was probably both. If you recall at the very begining of the Balak and Balaam account, back in Numbers 22, we learn that these two nations colluded together:
Moab said to the elders of Midian, “Now this horde will lick up all that is around us, as the ox licks up the grass of the field.” And Balak the son of Zippor was king of Moab at that time (Numbers 22:4).
So the elders of Moab and the elders of Midian departed with the fees for divination in their hand (Numbers 22:7).
God said that the Midianites were involved in deceiving Israel with the women of Moab. They were also involved in deceiving Israel with respect to the Midianite woman, Cozbi, a daughter of the leader of the Midianites, whom Phineas killed along with the Simeonite leader she had enticed. Both groups sought out the diviner Balaam to curse Israel. And both groups followed Balaam's advice in tricking Israel into sin against their God.
Therefore, while predominantly Moabite women were involved. The Midianites were involved as well, particularly the leading woman, Cozbi.