Determine a stock is undervalued or overvalued

I know using the CAPM to calculate the required return, which is equal to the expected return. Then comparing the number with forecast return. But why using forecast return as benchmark to determine undervalued or overvalued? Forecast and required return seems both future return, which is unknown.

For short, why required return less than forecast return means this stock is undervalued? Vice versa

Thanks!