The leaven of the Pharisees is legalism. The Pharisees kept scores of rules and regulations, but their hearts were not right with the Lord. The leaven of the Sadducees is not legalism, but liberalism. The Sadducees said, "There are no miracles. There are no angels. There is no resurrection. This whole thing is really just to help you become a better person."
Beware of the leaven of legalism and liberalism. Galatians deals with the subject of legalism and Colossians with the subject of liberalism.