How to get a clean 50 kHz square-wave with 555 timer (Astable Mode)?
The usual reason for ringing is wire inductance including ground clip resonating with the probe cable capacitance.  With you short all the leads incl. gnd clip to 1cm that inductance of ~&lt;10nH/cm will make it better. To improve further requires a load resistor, either pullup to Vcc or down or both.