The cab company will only have liability if the cab driver is at fault for the accident or is partially at fault for the accident, which is referred to as "comparative negligence". There are some senarios where a car can be rear ended and still have some liability for an accident. If you don't have a claim against the cab company, you may very well have a claim against driver of the car that rear ended the cab. The accident report, which is typically available 3-5 days after an accident, will contain the insurance information for cab and the other car involved in the accident.
You may sue the cab company if they were at fault or negligent in causing the accident. You may have a claim against the person who rear ended the cab. You may want to consult an attorney to look into your potential claims.
You should be seen by a medical provider. You should also talk to a lawyer. You almost certainly have rights against someone, it is rare for cars to just run into one another without someone being at fault. Even if no one is at fault many states have rules that create a special duty of car for service providers like cab companies like everything else in the law you need to talk to a local attorney who knows the local law.
You may find some helpful information in the blog at my website.