Definitely sounds like a bad ground issue.
Check the ground wire going to the bulb socket and make sure it has a good solid ground.
You can do this using a 12v test light by connecting the light to the 12v + battery post and then touching it to the ground terminal on the bulb socket.
Most times the ground wire will be black. You can look at a wiring diagram to confirm circuit wire colors.
_________________
Supporting Vendor and Moderator of LOST05 Jeep Liberty CRD Limited
Ironman Springs/Bilstein/Shocks
Yeti StgIV Hot Tune
Week's BatteryTray
No FCV/EGR
Samcos/ProVent
SunCoast/Transgo
Carter Intank-pmp
2mic.Sec.Fuel Filter
Flowmaster/NO CAT
V6Airbox/noVH
GM11 Bld.fan/HDClutch
IronrockArms/wwdieselMount98 Dodge Cummins 24 Valve