As a contractor I see this all of the time. The best remedy is to install a pair of 1-gang old work or remodel boxes. These are usually blue boxes with tabs that flip out and hold tight to the back of the wall. Install is just a matter of cutting the hole, feeding the wire into the box, and tightening the screws. If you decide to proceed just be cautious of the wire in the wall when cutting.
Affectionate_Zone623 t1_isjxh9q wrote
Reply to Bathroom light missing junction box by MiddleChildSyndrome3
As a contractor I see this all of the time. The best remedy is to install a pair of 1-gang old work or remodel boxes. These are usually blue boxes with tabs that flip out and hold tight to the back of the wall. Install is just a matter of cutting the hole, feeding the wire into the box, and tightening the screws. If you decide to proceed just be cautious of the wire in the wall when cutting.