CVE-2026-58399: CWE-287: Improper Authentication in antonio-castellon module-auth
@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.
AI Analysis
Technical Summary
CVE-2026-58399 describes an improper authentication vulnerability (CWE-287) in the antonio-castellon module-auth package. Versions before 2.3.0 allow an unauthenticated attacker to bypass token validation by exploiting the validateToken middleware's logic, which trusts the 'auth-user' and 'Host' HTTP headers. Since both headers can be spoofed by a remote client, the attacker can craft requests that bypass normal legacy, JWT, or OIDC authentication checks. The vulnerability is fixed in version 2.3.0.
Potential Impact
An unauthenticated remote attacker can bypass authentication controls, potentially gaining unauthorized access to services protected by the module-auth middleware. This undermines the security of microservices relying on this authentication system, leading to possible unauthorized service-to-service communication or access.
Mitigation Recommendations
Upgrade to version 2.3.0 or later, where the authentication bypass vulnerability has been fixed. No other official remediation or temporary fixes are indicated. Patch status is confirmed by the vendor's versioning information.
CVE-2026-58399: CWE-287: Improper Authentication in antonio-castellon module-auth
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.
CVSS v4.0
Score 8.7high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-58399 describes an improper authentication vulnerability (CWE-287) in the antonio-castellon module-auth package. Versions before 2.3.0 allow an unauthenticated attacker to bypass token validation by exploiting the validateToken middleware's logic, which trusts the 'auth-user' and 'Host' HTTP headers. Since both headers can be spoofed by a remote client, the attacker can craft requests that bypass normal legacy, JWT, or OIDC authentication checks. The vulnerability is fixed in version 2.3.0.
Potential Impact
An unauthenticated remote attacker can bypass authentication controls, potentially gaining unauthorized access to services protected by the module-auth middleware. This undermines the security of microservices relying on this authentication system, leading to possible unauthorized service-to-service communication or access.
Mitigation Recommendations
Upgrade to version 2.3.0 or later, where the authentication bypass vulnerability has been fixed. No other official remediation or temporary fixes are indicated. Patch status is confirmed by the vendor's versioning information.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-30T18:19:58.378Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a45260a27e9c79719982a86
Added to database: 07/01/2026, 14:36:58 UTC
Last enriched: 07/09/2026, 09:21:14 UTC
Last updated: 08/14/2026, 00:41:13 UTC
Views: 66
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.