A word that describes something you shouldn't have said
I think you might be looking for faux pas which was borrowed from French (it's French for "false step") as far back as the late 17th century.
Merriam Webster defines it as
a significant or embarrassing error or mistake
especially : a socially awkward or improper act or remark