In this paper, we study the semilinear elliptic problem with critical nonlinearity and an indefinite weight function, namely βDeltau=lambdau+h(x)u(n+2)/(nβ2) in a smooth open bounded domain OmegasubseteqmathbbRn, n>4 with Dirichlet boundary conditions and for lambdageq0. Under suitable assumptions on the weight function, we obtain the positive solution branch, bifurcating from the first eigenvalue lambda1β(Omega). For n=2, we get similar results for βDeltau=lambdau+h(x)phi(u)eu where phi is bounded and superlinear near zero