Colombia's state oil company says a bomb attack caused an oil spill and halted the flow of crude along the country's second largest pipeline.