What is the DTC code on it? It can be as simple as replacing the O2 sensor, or it can be more involved like replacing catalytic converter, repairing exhaust, changing the wiring, or even replacing the PCM.
That said, what is the price point and house much (money/effort/time) are you willing to...