But my question is how secure is the hashing algorithm? I don't know if I remember seeing this correctly somewhere, but I remember reading about how Bitcoin's hashing function could potentially be vulnerable. I don't remember any of the arguments as to why, but was wondering how safe SHA256 is.
There is currently no indication that there are any significant weaknesses in any of the three cryptographic algorithms (ECDSA, SHA256, RIPEMD160) used by Bitcoin.
Perhaps a mathematics researcher will discover a weakness in the future, perhaps they will not. It is impossible to predict.
There is a known weakness in ECDSA related to quantum computing
if quantum computers are ever powerful enough. There should be plenty of time for us to switch to a different algorithm if that ever seems likely.