Does Rooting Exploit a Security Weakness?
First, there's nothing like THE rooting process. You partly answered your question yourself: rooting a device can be done in different ways. The two best known methods include:


using an exploit (SuperOneClick &amp; Co do this: You install an app, klick it, and get rooted)
via a custom recovery (which is directly bootable and thus can access the device directly, so you can install any ROM -- which in turn may already be rooted)


So answering your question: Yes and no -- it all depends on how you root your device. Listing up all possible exploits might get a bit lengthy, so better let's skip that part. You might also check the questions in the "related" section of this page for more details (especially What are the steps for rooting an Android device, in general?).