The vulnerability lies in the VerifyHostToken function in logic/jwts.go, which is responsible for verifying JWTs for host authentication. The original implementation failed to check the validity of the JWT signature, only verifying that the token was not nil. This allows an attacker to forge a JWT with arbitrary claims, bypassing authentication and gaining access to sensitive host information. The patch addresses this by adding a check for token.Valid in VerifyHostToken. Additionally, the Authorize middleware in controllers/node.go was using the vulnerable VerifyHostToken function. The patch refactors this middleware into AuthorizeHost and replaces its usage in various API endpoints, ensuring that all host authentication now uses the corrected token validation logic.