@acastellon/auth has an authentication bypass via spoofable headers in validateToken()
Description
@acastellon/auth is an authentication control system for microservices. Versions prior to 2.3.0 appear to allow an unauthenticated authentication bypass in validateToken() through spoofable auth-user and Host request headers. The validateToken middleware contains a service-to-service bypass for auth-user: service-brother when req.get('host').startsWith(getHostName()). Both values involved in the check can be influenced by an unauthenticated HTTP client: auth-user is a request header, and Host is also client-controlled. As a result, a remote unauthenticated attacker can send a request with crafted headers and bypass token validation before the normal legacy/JWT/OIDC validation logic runs. A fix has been implemented in v2.3.0.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
@acastellon/authnpm | < 2.3.0 | 2.3.0 |
Patches
Vulnerability mechanics
References
4- github.com/advisories/GHSA-gfj5-979r-92pwghsaADVISORY
- github.com/antonio-castellon/module-auth/issues/6ghsax_refsource_MISCWEB
- github.com/antonio-castellon/module-auth/security/advisories/GHSA-gfj5-979r-92pwghsax_refsource_CONFIRMWEB
- www.npmjs.com/package/@acastellon/auth/v/2.3.0ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.