Depends entirely on the two girls involved. Hard to answer without any details.
My daughter is 13 and in seventh grade and is friends with a girl who is 18 and a senior, but they both have schedules far too busy (especially with one of them getting ready for college) to see each other much. But if they could get together more I'd be fine with it since the older girl is (a) one I've known for years through church; (b) a great role model for being academically strong. My daughter is interested in talking about things like books and school and college plans, and the older girl says that my kid is more interested in talking about those things than many of her HS peers are.
In your case, is your own child the HS girl or the MS girl? How long have the girls known each other? If it's a new or sudden friendship, that could be more of an issue - maybe one of them feels she doesn't fit in with her own age group (younger girl is more mature, or older one is less mature, etc.). Maybe they have an activity or interest in common? Did they meet through some outside group or class they're both doing? Common interests are great and definitely can trump age when it comes to forming friendships.
How do they act around each other? What do they talk about? What do they do together? If it's all positive, I would think it's OK. (Yes, mom, it's fine to eavesdrop some to get a sense of what they talk about and how they relate to each other.) If their talk is negative, or either girl seems to be influencing the other negatively, or (worst of all to me) they spend their time together on social media and you don't know what they're doing on there or with whom they're talking --that would be an issue, to me, and I might redirect my child toward other activities with other friends. (But don't forbid anything unless there's immediate danger-- if you say "You can't see Sally anymore because she's just too old/too young for you," you will turn Sally into sweeter "forbidden fruit" and your child will feel you have injured her friend.