6. As shown in Figure 1, the three vertices of the right triangle $\triangle ABC$ are all on the given parabola $x^{2}=2 p y(p>0)$, and the hypotenuse $AB \parallel x$-axis. Then the altitude from $C$ to the hypotenuse $|CD|=$ $\qquad$
6. $2 p$.

Let $A\left(2 p t_{1}, 2 p t_{1}^{2}\right), C\left(2 p t_{2}, 2 p t_{2}^{2}\right)$. Then $B\left(-2 p t_{1}, 2 p t_{1}^{2}\right)$.
Since $A C \perp B C$, we have $\overrightarrow{A C} \cdot \overrightarrow{B C}=0$, which means $4 p^{2}\left(t_{2}-t_{1}\right)\left(t_{2}+t_{1}\right)+4 p^{2}\left(t_{2}^{2}-t_{1}^{2}\right)^{2}=0$.
Given that $\left|t_{1}\right| \neq\left|t_{2}\right|$, then $t_{2}^{2}-t_{1}^{2}=-1$.
Therefore, $|C D|=2 p\left|t_{2}^{2}-t_{1}^{2}\right|=2 p$.