"Keep an open mind –
but not so open that your brain falls out"
This excellent piece of advice is most often attributed to physicist Richard Feynman (1918-1988), but also a slew of other more or less famous people, most of them from the field of science: Richard Dawkins, Carl Sagan, James Oberg, Bertrand Russell, J. Robert Oppenheimer, Virginia Gildersleeve, Harold T. Stone ... To name but a few.
Here is the earliest example I have found (yet) of the quote. As it's written, it was apparently coined even earlier.
[Practical gentlemen] have a number of bitterly sarcastical comments on persons whose minds are so open that their brains fall out.
Max Radin (1937)
Here are some even older variants, but without the brain (so to speak): "Their minds are so open that nothing stays in" (1932), "a mind so 'open' that almost anything can blow through it without leaving a trace" (1928) or "a mind so open that it had nothing in it at all" (1908).
I suspect that the quote (like so many others) was not coined by someone famous, but by an anonymous talent who modified an existing phrase.
Max Radin, "On Legal Scholarship", The Yale Law Journal May 1937
New York Times November 13, 1932
New York Times February 4, 1928
Edward Clark, Selected speeches (1908), page 69