Hi there,
I'm sure you've already taken action on this one, but if not here's my two bits.
I am late-stage CF, waiting for transplant, and I have to take a lot of painkillers to deal with my lung pain. It's not actually pain from right IN the lungs, but from a lot of scarring in the membrane around the lungs called the pleuritic membrane. With CF it gets stuck to the ribs and irritated and this causes a lot of pain, so this could be one of the things causing that for your husband.
The other thing, the gum pain, is something I get too. I believe it's associated with more inflammation, which often means that my body is fighting an infection.
If your husband is spitting blood as well, it could mean he needs some antibiotic treatment as some CFers only cough up blood when they are having an exacerbation (a flare-up of the CF which means we need antibiotics).
Some people though, myself included, cough up blood for no reason at all, and just out of the blue.
Your husband should get checked out by his CF doctor soon though. I hope that helps somewhat!