You are very correct that this can happen- If i'm not wrong, what happened during the last 6 minutes of Swissair Flight 111 will never be known for this reason.
In general however, by the time the fire would spread to this extent the CVR and/or FDR would probably have picked up some hint of fire and the reason. To increase survivability, the FDR and CVR are connected off separate power buses ('boards'), so I'd imagine the cables for each not exactly next to each other on the fuselage, and if one trips, the other one will hopefully still run for a bit longer.
The cockpit voice recorder operates a simple microphone I believe, so I'd expect that it wouldn't be much more complicated than your computer microphone. The data would probably be converted from analog to digital before being transmitted backwards.
As for the 88 parameters that the Flight Data recorder currently requires, I'd imagine that there would be a serial connection from each relevant part- each flight computer, engine etc. all leading to the back of the aircraft.
Source: FDR Handbook- NTSB