The draw drops Sochaux into the relegation zone heading into the final games of the season.
The home side had the first effort on goal after a drive forward from Boudebouz, but his shot was well saved by Cedric Carrasso.
Bakambu was then presented with another opportunity for the hosts, but he missed with his attempt on goal.
Ludovic Obraniak responded for Bordeaux but was unable to test the Sochaux goal.
However, Sochaux took the lead in the 34th minute through a Boudebouz penalty that smashed into the bottom left corner of the net.
Diabate nearly doubled the hosts' lead just before the break, but his header went over the bar.
Diabate went close again just after half time, but his header was again too high following Obraniak's cross.
However, Bordeaux were finally rewarded with an equaliser when Diabate turned provider and headed his pass to Mariano, before the latter slammed his shot into the top corner.
They weren't level for long as Bakambu restored Sochaux's lead 26 minutes from time after putting the ball in the bottom right of the net.
Bordeaux found a second equaliser with 12 minutes left after Diabate's header found the top corner.