I have found this sentence in a text book so I suppose it's correct, but I'm a bit confused. I thought that when the verb "need" is used as a modal verb it must be followed by a verb in base form.
2 Answers
Past tense
Need not by itself is a present tense action, though when have been is added to the end, we are assuming he was previously not needing. i.e. he did not need ____ in the past.
In this example,
[In the past] he did not need to be anxious.
or more like the example
He need not to have been anxious [in the past], though.
I believe it is Present Perfect Continuous, since the phrase is in the present but references the past.