You are a winner!
Correct guess.
Is your outside temp display reading -40? if it reads accurately just snap it back in place and count yourself lucky. Oh, tell your wife to stop hitting the curb, parking blocks, etc at the local 7-11, (fast food, mall, grab and Go, etc)
Note: it is coming out of the brake duct, it belongs in the forward lower panel. Are the tabs to hold it still there? lay on back and look just behind the bumper on that side. You should see a plastic panel with a dent and tabs that hold that sensor in a little cavaty, allowing ambent air to cross it as you drive along. You will have to disconnect the sensor, feed the wire through the hole and then reconnect the sensor.
If the sensor reads -40 afterwards, it will re-adjust itself over the nest few days, as some genius engineer put in a resistor in the circuit to stop reading fluxuation of temps at stop lights. Now you don't get to see the drop on the fly temps when crossing bridges in cold weather. This goes to the "engineer to solve problems no one knew existed before" issue.
__________________

2005 X5 4.8IS
The
Blue ones are always FASTER....
Current Garage:
2005 X5 4.8is
2002 M5 TiSilver
2003 525iT
1998 528i
Former Garage Stable Highlights
2004 325XiT Sport
1973 De Tomaso Pantera, L Model
1970 Dodge Challenger T/A 4 sp Alpine White
1970 Dodge Challenger T/A 4 sp GoManGo Green
1971 Dart Sport, “Dart Light” package
1969 Road Runner 383
1968 Ply Barracuda 340S FB Sea-foam Green