In order for a short sale with two loans to happen, the second lien holder has to drop the lien.
If they don't, and there's no short sale, the home goes to foreclosure and the first lien holder gets the house because second liens are subordinated debt to the primary loan.
In short, the second lien holder gets nothing. In order to get the second lien holder to drop the lien, the first lien holder generally negotiates some partial payment to the second lien holder. The second lien holder doesn't have to agree, but more and more are doing so.
That's all legal.
But here's what's not legal and what's apparently happening quite often recently. Since many second lien holders are getting very little, they are now allegedly requesting money on the side from either real estate agents or the buyers in the short sale. When I say "on the side," I mean in cash, off the HUD settlement statements, so the first lien holder doesn't see it.