Well, the main legal issues could be related to invasion of privacy. Celebrities have a right to their personal lives not being exploited in a sexual way through fan fiction. Also, there may be trademark and right of publicity issues. If the story is sold or distributed in a way that makes it seem like it's associated with the celebrity in a commercial sense, that could be a violation. In short, creating and distributing such stories can put one at risk of facing legal action from the celebrity or their representatives.
One potential legal issue is copyright infringement. While fan fiction often operates in a bit of a gray area, when it comes to sexual content about a celebrity, it can be seen as misusing the celebrity's brand or likeness which is protected by copyright. Additionally, if the story causes emotional distress to the celebrity, there could be a claim for that as well. It's a complex area of law, but these are some of the main concerns.
There could be issues of defamation. If the story portrays the celebrity in a false and negative sexual light, it might be considered defamatory. Also, it could potentially violate the celebrity's right to privacy, as it is an unwanted and inappropriate use of their public image.