Do you mean a substance that looks like worms? (In other words, not jelly-like worms but worm-like rolls of jelly?) Or real worms, like, living? If real worms, have you googled pinworms?
Do you have this when you don't use the hair brush?
turns out it was the brush that was the issue