The visitors ended the game with eight men and were on the back-foot from very early on as in the 6th minute Ion Echaide saw red.
Despite losing the centre-back, Cordoba took the lead through Florin Andone before Imanol Agirretxe levelled for Sociedad just after the half-hour.
La Liga???s bottom club held firm until 15 minutes from time when Gonzalo Castro put the hosts in front for the first time.
From there on things unravelled quickly for Cordoba as first Inigo Lopez and then Dani Pinillos were sent off, with Alfred Finnbogason sealing the win for Sociedad in between the two.
Sevilla got the better of Villarreal for the second time in four days as they won 2-0 against the side directly below them in the table.
Second half goals from Coke and Vitolo were enough to condemn The Yellow Submarine to defeat, making it four games without a win for them.
Sevilla meanwhile are still in the hunt for a Champions League place and sit just four points behind fourth placed Atletico Madrid.
A goalless draw between Deportivo and Espanyol leaves the former right in the midst of a relegation battle, just a point above the drop zone.
The best chance fell to Espanyol but Moreno was unable to convert, sending the ball crashing against the bar from a Lucas Vazquez free-kick.