The biggest risk is...
The biggest risk of quitting a job before confirming a new one is that you may end up without a job or income for a period of time.
What could make this risk worse
This can be especially risky if you don't have any savings or other financial resources to fall back on.
Additionally, quitting a job without having another one lined up can damage your professional reputation and make it more difficult to find a new job in the future.
What you can do to reduce the negative impacts
It's always a good idea to have a backup plan in place before quitting a job, such as having a confirmed job offer or enough savings to support yourself while you look for a new job.