is this legal?

It may be legal if their not charging rent
Some state’s have Squatters rights, meaning you have to get a court order to evict them after only 30 days.