This looks like plot device magic.
That is, there's no "standard" monster / trap / spell / notoriously unsanitary inn that gives you Red Worms of Being Unable to Polymorph. This is something the DM has chosen to inflict on you, which they might do for any of several reasons:
As a puzzle. This is basically how you're approaching it in this question: as a problem to be solved using the tools your characters have available. (Both "cut you open and remove the bugs" and "gather herbs to make a worm-killing potion" are good starting points, at least.) In this case you need to pay close attention to any details about the problem the DM gives you, and try things to see what kind of obstacles you run into.
As a plot hook. That is, it's a problem to be solved but you don't have the tools you need; you will subsequently be given the chance to go get them, or meet someone who can help. In this case you need to be asking every NPC and looking in every library and apothecary's shop and witch's hut until you find the hook. (I've done this as a DM; I had two PCs get an infection from messing around in some caves, and then they met a doctor, a priest, and an alchemist who all proposed various cures which required them to go to dangerous places and do adventurer stuff.)
As a plot complication. You're doing that one Iron Man movie where Tony Stark wrecks his suit and is stuck in a small rural town and has to storm the bad guy's compound using stuff he can buy at the hardware store. The point isn't for you to stop and solve the problem; it's to do other stuff you need to do, with the additional handicap of being unable to change form. (This is a variant of the fairly standard scenario where you get thrown in jail without your weapons or spellbooks.)
Because you're being nerfed. Wereravens come with two very game-breaking powers: immunity to mundane damage, and flight. The flight in particular trivializes many problems ("You must cross the Mississippi River, but it's full of man-eating hippos and the only bridge is guarded by a murderous bandit gang led by--" "Fine, I fly across."), and both of them are problematic when only one person in the party has them. Perhaps they're being taken from you. In this case you're not getting your wings back, at least not until the party is high enough level that the advantages no longer matter much. You can accept that, or you can open a discussion with the group about it and try to work out a compromise.
You need to know which one it is, because a correct solution to any of these is an inappropriate response to the others. If you think it's #3 or #4 and say "Fine, I guess I can't transform, sucks to be me" and it's actually #2, then you're going to miss whatever plot hook is being offered this way. On the other hand if you think it's #1 and it's not, then you're (totally inadvertently!) stalling the entire campaign while you talk about anti-helminthic herbs. And if you think it's #2 and it's really #4, your character will be walking up to random strangers and yelling "I've got worms! Does anyone know how to cure me?" for a long time.
It's pretty reasonable to ask the DM something like "Is this a problem you intend us to try to solve ourselves, or do we just have to wait for a solution to present itself, or is it really incurable?" The goal isn't to get them to hand you a solution, but just to know whether you're derailing the game.