The answer to the riddle is ray (specifically, a stingray). Stingrays are large, flat-bodied cartilaginous fish (class Chondrichthyes) with wing-like pectoral fins and a long, whip-like tail armed with one or more serrated, venomous spines. They inhabit shallow coastal waters worldwide, often buried in sand. When threatened, they lash their tail upward, injecting venom that causes excruciating pain, tissue necrosis, and potentially fatal cardiovascular effects. The term "ray" also includes non-venomous relatives (manta rays, eagle rays, electric rays). "Ray" fits the four-letter clue perfectly and is a common crossword answer for "flat fish with a sting."