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.
Published: 2026-07-01
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The @acastellon/auth module contains a flaw in its validateToken() middleware that allows a remote attacker to bypass authentication without presenting a valid token. By sending a request that includes an auth‑user header set to the value service‑brother and a Host header that begins with the service’s own hostname, the middleware short‑circuits the normal legacy/JWT/OIDC validation logic. The flaw is identified as CWE‑287 and grants attackers the ability to impersonate any user the service would normally trust.

Affected Systems

Deployments of the antonio‑castellon:module‑auth package with a version earlier than 2.3.0. These instances are vulnerable whenever they process HTTP requests from clients that have not already been authenticated. Updating to version 2.3.0 or newer removes the vulnerable header validation code.

Risk and Exploitability

The flaw has a CVSS score of 8.7, indicating high severity. The EPSS score is less than 1%, suggesting that exploitation is currently uncommon, and the vulnerability is not listed in the CISA KEV catalog. The vulnerability can be leveraged by any entity that can send arbitrary HTTP requests to the affected microservice, forging the auth‑user and Host headers to bypass token checking. This attack requires only network reachability to the service.

Generated by OpenCVE AI on August 3, 2026 at 06:05 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the antonio-castellon:module-auth package to version 2.3.0 or later, which removes the flawed validation logic.
  • Configure front‑end proxies or load balancers to strip or reject the auth‑user header for external traffic and enforce strict host header validation before requests reach the microservice.
  • Limit exposure of the microservice by restricting inbound traffic to trusted internal networks and consider adding additional application‑level authentication checks if a patch cannot be applied immediately.

Generated by OpenCVE AI on August 3, 2026 at 06:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gfj5-979r-92pw @acastellon/auth: Authentication bypass via spoofable headers in validateToken()
History

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Antonio-castellon
Antonio-castellon module-auth
Vendors & Products Antonio-castellon
Antonio-castellon module-auth

Thu, 02 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
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.
Title @acastellon/auth has an authentication bypass via spoofable headers in validateToken()
Weaknesses CWE-287
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Antonio-castellon Module-auth
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-02T14:26:00.684Z

Reserved: 2026-06-30T18:19:58.378Z

Link: CVE-2026-58399

cve-icon Vulnrichment

Updated: 2026-07-02T14:25:57.146Z

cve-icon NVD

Status : Deferred

Published: 2026-07-01T15:17:11.377

Modified: 2026-07-02T17:54:15.243

Link: CVE-2026-58399

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T06:15:04Z

Weaknesses