The correct, if not very useful, answer to the title question is no, not absolutely necessary. But philosophy departments aren't likely to advertise very often for mathematicians or computer scientists grounded in computability (an important topic in epistemology).
Like any other modern academic field, philosophy has specialization, and some departments are very specialized. So, with certain skills, but not a broad knowledge of the foundations of philosophy you would find a few positions open, but I suspect they would be rare.
Being specialized is both a blessing and a curse. The curse comes because you might not be suitable to teach the courses that need teaching, but the blessing is that you know how to go deep into some important topics.
If you have a degree already in math, philosophy might present an option if the right position came along. But it would probably be a mistake to try to build a career on the assumption that it would be easy to do so.
Also, of course, if you just love it, there is no real reason why a mathematician or linguist can't enter into collaborative relationships with philosophers on topics of common interest. Such relationships can be highly productive.