Can a broken thermostat on an oil boiler cause hot water to flow out through the expansion pipe?

Yes, the water is getting too hot and is blowing out the pressure relief valve through the expansion tank. You should change this immediately.

I don't agree:
I am assuming that by expansion pipe, you are referring to the pipe connected to the pressure relief valve - A broken Thermostat won't cause the relief valve to activate. A broken thermostat will cause the boiler to either run or not run as desired. However, a broken (or incorrectly set) aquastat can cause the boiler to run too hot and cause the valve to activate, but if it is chronic, it could be a defective or dirty relief valve, defective expansion tank, a problem with the pressure reducing valve on the domestic feed or (as was my problem) an internal leak in my tankless coil.
What is your boiler's pressure gauge reading and what does the Temp Gauge read on a call for heat (High Limit on and off)? Also, put a bucket under the pipe and carefully burp the relief valve to clear out any debris that might be causing the leak.