Despite people saying "he went in two-footed and that's a red", this is what Law 12 actually says:
Direct free kick
A direct free kick is awarded if a player commits any of the following offences against an opponent in a manner considered by the referee to be careless, reckless or using excessive force:
(It goes on to give a list of offences and then says:)
- Careless is when a player shows a lack of attention or consideration when making a challenge or acts without precaution. No disciplinary sanction is needed
- Reckless is when a player acts with disregard to the danger to, or consequences for, an opponent and must be cautioned
- Using excessive force is when a player exceeds the necessary use of force and endangers the safety of an opponent and must be sent off
SERIOUS FOUL PLAY
A tackle or challenge that endangers the safety of an opponent or uses excessive force or brutality must be sanctioned as serious foul play.
Any player who lunges at an opponent in challenging for the ball from the front, from the side or from behind using one or both legs, with excessive force or endangers the safety of an opponent is guilty of serious foul play.
Law 12 says it's quite OK to tackle with both legs as long as that's not with excessive force or endangers the safety of an opponent. Kompany's tackle didn't meet either of those criteria so it certainly wasn't a red. If we accept that he caught Salah and it was a foul, then it was therefore between careless and reckless. You could well argue that it was the former, in which case the yellow was harsh, or the latter, in which case it was justified.
You could certainly argue that the tackle that Lovren got a yellow card for in the first half was worse according to those criteria and that he potentially endagered the safety of an opponent.