You cannot run the later versions of Firefox on CentOS 5.x. See here:
Lower level libraries that Firefox depends on aren't being kept up to later enough versions that the newer versions of Firefox are being compiled against. This is typically the case with long term releases.
Firefox puts out what they call ESRs (Extended Service Releases) which typically have a wider target audience of distributions that they support. ESR 17 was the last to work on CentOS 5.x so I wouldn't expect to go much further than this one.
What is Mozilla Firefox ESR?
Mozilla will offer an Extended Support Release (ESR) based on an official release of Firefox for desktop for use by organizations including schools, universities, businesses and others who need extended support for mass deployments. You can read more about the plan here.
Version 24 of Firefox will become ESR 24, and this version definitely will not run on CentOS 5.x (according to the testing I've done on 5.9). So you're essentially stuck on this older version until Mozilla releases a newer version built with the older libraries support.
You could always try and compile it yourself on CentOS 5.x targeting this older version of the library.
I've done this before but would not recommend running this way. You can "sometimes" find prebuilt versions of Firefox and it's corresponding packages (XUL - aka. libxul) from other releases of Fedora. These .so libraries can "sometimes" be unpackaged on CentOS 5.x into a separate directory and then brought into the mix when invoking Firefox.
./firefox: symbol lookup error: ./libstdc++.so.6: undefined symbol: _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE, version GLIBCXX_3.4
This has the effect of allowing Firefox to run with the newer libraries it wants while still leaving your CentOS 5.x system's central libraries intact for the rest of the system.
This in general will work, but I've noticed that Firefox doesn't perform as reliably when operated in this state, so I would recommend not bothering with this approach!