There are a few factors at play here. The temperature that the coffee is brewed at and how well the flask holds that temperature are primary.
While the coffee stays hot the caffeine level will decrease. The speed will depend on the temperature and the amount of caffeine to start with (which is thoroughly discussed in other questions here).
When the coffee cools bacteria growth will start. At what point this bacteria become dangerous not only depends on temperature but also how clean the flask was to begin with and what quality water is being used. Clean tap water in the US, brewing coffee in a very clean french press, and placed into an incredibly clean flask could last two weeks (although it would taste terrible and have little caffeine) but if any of those steps is less than ideal there is a good chance of bacteria growth. Some people's guts will handle that bacteria without a problem, other people may get sick.
Edit: I should point out that as I have researched more I'm less certain about the statement regarding caffeine levels over time. Caffeine should not burn at any temperature coffee is left at, and it does not evaporate. So either experiments that say caffeine levels decrease are wrong or the reason it decreases is not clear. Some suggest that bacteria eats the caffeine, which does tie into why it becomes less safe to drink over time.