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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.54%, higher than 47% of CVEs (2026-12-01)
- Published: 2026-06-18T17:22:47.000Z
- Modified: 2026-10-25T17:10:00.197Z
- Also known as: GHSA-gfj5-979r-92pw
- Weaknesses: CWE-287, CWE-290
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- antonio-castellon module-auth: < 2.3.0
- @acastellon/auth (npm): before 2.3.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`

## References

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

## Sources

- CVE List: [CVE-2026-58399](https://www.cve.org/CVERecord?id=CVE-2026-58399), CVE Terms of Use, modified 2026-07-02
- GitHub Advisory Database: [GHSA-gfj5-979r-92pw](https://github.com/advisories/GHSA-gfj5-979r-92pw), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-58399](https://nvd.nist.gov/vuln/detail/CVE-2026-58399), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-58399 · Whole record: https://cve.day/CVE-2026-58399.json · Rebuilt by cve.day 2026-11-25T22:59:26.909Z
