Wikipedia - List of earth's flybys states that 301km by Galileo is the shortest flyby. However it has contradicting information, and seems to be false:
gravity assist en route to Jupiter; minimum distance 960 km
The actual distance of this flyby is 960km, not 301km.
So what is the shortest flyby then?
Well, it's also by Galileo, at 303km by the NASA JPL document Galileo End of Mission Press Kit, September 2003 or less accurately at 305km by Wikipedia for Galileo's second flyby of Earth.
After flying past Venus at an altitude of 16,000 kilometers (nearly 10,000 miles) on February 10, 1990, the spacecraft swung past Earth at an altitude of 960 kilometers (597 miles) on December 8, 1990. That flyby increased Galileo's speed enough to send it on a two-year elliptical orbit around the Sun. The spacecraft returned for a second Earth swingby on December 8, 1992, at an altitude of 303 kilometers (188 miles). With this, Galileo left Earth for the third and final time and headed toward Jupiter.
Galileo's flying path from the same NASA document:
Now to prove this, I have to dig up all the closest approaches of the blank spaces in the Wikipedia pages :(
Sakigake, 1st, 2nd and 3rd passes:
- 1st: 88,997km
- 2nd: 40 earth radius - 255,125 km
- 3rd: 86 earth radius - 548,520 km
StarDust, 1st and 2nd passes:
- 1st: 6,008 km
- 2nd: 9,157 km
Rosseta, 1st, 2nd and 3rd passes:
- 1st: 1,954 km
- 2nd: 5,700 km
- 3rd: 2,481 km
Deep Impact 1st, 2nd, 3rd, 4th, and 5th passes:
- 1st: 15,567 km
- 2nd: 43,450 km
- 3rd: 30,496 km
- 4th: Unknown*
- 5th: Unknown*
Hayabusa2 1st pass:
PROCYON 1st pass:
- 1st: Unknown* (probably due to ion thruster malfunction that occurred)
Shin'en 2 1st pass:
- 1st: Unknown* (no Wikipedia page or information online at all)
Note that this Wikipedia page is very incomplete, and lots of information can be found online. Note I am also posting all values for anything missing. E.g. if StarDust is missing the value for its 3rd flyby, I'll show all values for all its 1st, 2nd and 3rd flyby.