In psychology, a flaw was a weakness or imperfection in a theory, research study, or a person's character.
In 2267, the Earth probe Nomad was declared flawed by Captain James T. Kirk. (TOS: "The Changeling")
In 2371, Captain Kathryn Janeway chastised Lieutenant Tuvok for using logic to justify having gone against her orders. She told him that one could use logic to justify anything, that this was its power, but also its flaw and that he should from now on first bring his logic to her. He agreed that while his logic was not in error, he was. (VOY: "Prime Factors")
That same year, as Deep Space 9 was in the throes of the counter-insurgency program, Gul Dukat arrived on the station with the intent of using the situation to his advantage. He noted that the program was not targeting Cardassians and thus, not Elim Garak, telling Garak that had Garak been on the station when the program was designed, he would have made an exception for him. Garak replied that Dukat had always been short-sighted, that it had held him back over the years and that his father had the same flaw. Dukat replied that his father's only flaw had been trusting him and Garak countered that at his trial, Dukat's father had said that his biggest flaw was that his ambition outweighed his patriotism. (DS9: "Civil Defense")