A vulnerability was found in Quarkus in the quarkus-security-webauthn module. The Quarkus WebAuthn module publishes default REST endpoints for registering and logging users in while allowing developers to provide custom REST endpoints. When developers provide custom REST endpoints, the default endpoints remain accessible, potentially allowing attackers to obtain a login cookie that has no corresponding user in the Quarkus application or, depending on how the application is written, could correspond to an existing user that has no relation with the current attacker, allowing anyone to log in as an existing user by just knowing that user's user name.
It is possible to mitigate this issue by disabling the default endpoints after creating a custom one. For example with the call for:
import io.vertx.ext.web.Router;
import jakarta.enterprise.event.Observes;
public class Startup {
public void init(@Observes Router router) {
System.err.println("Securing WebAuthn default controller");
router.post("/q/webauthn/callback").order(0).handler(rc -> rc.fail(404));
}
}