There was a similar case brought up by George RR Martin on his blog a long time ago, where he was talking about why he personally disapproves of fanfiction:
https://grrm.livejournal.com/151914.html
Turned out that it's a super convoluted story but the threat of a lawsuit by a fanfic author...