Contradiction with Matthew 5:44
Numbers 25:18 speaks about enmity towards the Midianites, while Matthew 5:44 instructs to love your enemies and pray for those who persecute you.
Matthew 5:44: But I say unto you, Love your enemies, bless them that curse you, do good to them that hate you, and pray for them which despitefully use you, and persecute you;
Contradiction with Romans 12:19
Numbers 25:18 discusses vengeance against the Midianites, whereas Romans 12:19 teaches that vengeance belongs to God alone and encourages leaving room for His wrath.
Romans 12:19: Dearly beloved, avenge not yourselves, but [rather] give place unto wrath: for it is written, Vengeance [is] mine; I will repay, saith the Lord.
Contradiction with James 1:20
Numbers 25:18 suggests anger towards the Midianites, but James 1:20 explains that human anger does not produce the righteousness of God.
James 1:20: For the wrath of man worketh not the righteousness of God.