best friend and boyfriend

so my bestfriend an boyfriend have been talking a lot recently and at first I was concerned. to my suprise he told me she was interested in me (I'm pansexual so I don't mind) my boyfriend brought up a threesome and honestly I was considering it 
​but I'm afraid it might mess up my relationship with her 
​I'm not really concerned about him and her having feelings for each other or them starting to 
​I just don't want to ruin my friendship with her because I got horny and selfish
​does anyone have experience with group sex and relationship and how did simular situations work out?