It depends on the particular fern that the fiddleheads are harvested from.
The only ferns that have sprouting brachts that are safe to eat come from the ostrich fern.
Many ferns have fiddlehead-shaped sprouts when they first start to grow in the spring.
If the fiddleheads are harvested from wild ferns other than the ostrich fern, they can be poisonous-some mildly, some severely.
It's also possible that fiddleheads that are grown for commercial use could contain e-coli due to the humus, moisture and compost (often containing manure) rich soil that they are grown in. Best to cook them well to kill any nasty bacteria harboring in those cute little curly-cues.
There's a terrific book on wild foods written by a survival teacher named David Brown. He clearly describes how to identify safe wild foods and those that are not safe.
Note-I've planted a bunch of ostrich ferns in the woodsy part of my back yard with the hope that in a few years, I can harvest some fiddleheads for my spring dinners. They seem to be growing slowly so I guess I'll just have to be patient.