CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-GFJ5-979R-92PW

GHSA-GFJ5-979R-92PW: Unauthenticated Authentication Bypass in @acastellon/auth via Header Spoofing

Alon Barad
Alon Barad
Software Engineer

Jun 18, 2026·6 min read·1 visit

Executive Summary (TL;DR)

Unauthenticated remote attackers can bypass JWT/OIDC validation in @acastellon/auth < 2.3.0 by spoofing the 'auth-user' and 'Host' headers.

An unauthenticated authentication bypass vulnerability exists in @acastellon/auth, an authorization middleware package for Express-based microservices. The vulnerability allows a remote, unauthenticated attacker to completely bypass token validation checks in the validateToken() middleware via spoofed HTTP headers.

Vulnerability Overview

The @acastellon/auth NPM package is an Express-based middleware library designed to handle unified authentication across microservice architectures. It integrates support for diverse protocols, including JWT, NTLM, and OpenID Connect (OIDC). By registering the validateToken(app) middleware, developers protect downstream API endpoints by requiring incoming requests to possess valid, cryptographically verified tokens.

In versions of the library prior to 2.3.0, a structural flaw exists in how the middleware handles service-to-service communication. To allow legitimate internal systems to interact without token validation, a dedicated trusted peer exception was implemented. However, this exception relies entirely on client-controlled values, establishing an authentication bypass vulnerability classified as CWE-290 (Authentication Bypass by Spoofing).

Because the middleware does not perform cryptographic validation of the client's identity when triggering this exception, any network adversary can exploit this pathway. An unauthenticated remote attacker can easily assume the identity of a trusted internal component, bypassing all authentication mechanisms. This access compromises the confidentiality and integrity of any API route secured by the module.

Root Cause Analysis

The root cause of the vulnerability lies within the validateToken function inside the auth.js module of @acastellon/auth version 2.2.0. The middleware attempts to authorize requests from a trusted internal service identity designated as service-brother using non-cryptographic attributes retrieved directly from the HTTP request context.

Specifically, the application parses the auth-user custom header and compares it against the hardcoded literal 'service-brother'. Simultaneously, the code retrieves the request's Host header via req.get('host') and asserts that it matches the configured server hostname or CNAME value returned by getHostName(). If both conditions are evaluated as true, the execution flow is immediately redirected to the Express next() function.

This logic represents a critical security failure because both the auth-user and Host headers are fully controlled by the client. The middleware trusts these attributes implicitly without validating the client's actual network boundary or cryptographic signature. Consequently, an attacker can supply these values arbitrarily, satisfying the conditional logic and preventing the subsequent token verification block from executing.

Code-Level Analysis and Patch Review

To understand the precise differences in execution flow, we compare the vulnerable implementation in version 2.2.0 with the corrected logic introduced in version 2.3.0. The patch replaces the insecure header evaluation with cryptographic Mutual TLS (mTLS) certificate verification and introduces mandatory sanitization for incoming request headers.

The vulnerable code path completely trusts incoming headers and passes them down the middleware chain. This allows an attacker to not only bypass token validation but also inject arbitrary user parameters or roles such as is-admin: true directly into the request headers. These headers are subsequently trusted by downstream route handlers.

The patched implementation in version 2.3.0 introduces the sanitizeIncomingAuthHeaders function, which runs first in the middleware lifecycle. This function explicitly deletes the client-supplied auth-user header and any headers starting with the is- prefix. Following sanitization, the middleware utilizes checkMtlsServiceAuth to perform secure authentication. This function retrieves the peer certificate from the TLS socket and validates the Common Name (CN) against an authorized list, injecting the authenticated context only after verifying the transport-layer identity.

Exploitation and Attack Vectors

Exploitation of GHSA-GFJ5-979R-92PW does not require specialized tooling, active session tokens, or pre-existing credentials. The attack surface is exposed to any network entity capable of issuing HTTP requests to the target microservice endpoint.

An attacker begins by identifying an API route protected by the vulnerable version of the library. They then construct an HTTP request that mimics the trusted peer service. By manually crafting the headers, the attacker supplies 'service-brother' in the auth-user header and specifies the target's public-facing CNAME or hostname in the standard Host header.

GET /api/v1/protected-resource HTTP/1.1
Host: target-api.example.com
auth-user: service-brother
is-admin: true
Connection: close

Upon receipt, the @acastellon/auth middleware matches the header values against the hardcoded conditions. Because the condition is met, the code immediately invokes next(). The unsanitized is-admin: true header is preserved, allowing the attacker to interact with the target microservice with administrative privileges.

Impact and Security Risk Assessment

The impact of this vulnerability is classified as Critical, as reflected by its CVSS v4.0 score of 9.3. The flaw permits complete authorization bypass, rendering cryptographic tokens, session states, and directory-service mappings (such as NTLM/LDAP) entirely ineffective.

Because downstream microservices in a distributed architecture often trust headers forwarded by gateway middleware, the absence of header sanitization in @acastellon/auth version 2.2.0 exposes internal APIs to privilege escalation. Attackers can control the context variables used by the application to enforce role-based access control (RBAC).

This vulnerability can lead to unauthorized data exfiltration, system state modification, and full takeover of the application interface. If the target endpoint exposes administrative actions, the unauthenticated attacker can execute state-changing operations without leaving standard audit trails.

Remediation and Defensive Mitigations

The primary remediation step is upgrading the @acastellon/auth dependency to version 2.3.0 or higher. This update removes the insecure header-based bypass mechanism, implements header sanitization, and shifts the peer validation architecture to Mutual TLS (mTLS).

To secure internal service-to-service communication, developers must configure the application to utilize client certificates. The updated middleware reads the peer certificate from the incoming socket connection and verifies that the Common Name (CN) matches one of the authorized values listed in the TRUSTED_MTLS_SERVICES configuration array.

const auth = require('@acastellon/auth')({
  TRUSTED_MTLS_SERVICES: ['trusted-gateway', 'internal-worker']
});

For environments where immediate dependency updates are not feasible, temporary mitigation can be implemented at the API Gateway or reverse proxy layer. Administrators should construct rewrite rules to drop incoming auth-user headers and any headers prefixed with is- at the external perimeter. This prevents external clients from injection attacks against the internal context.

Technical Appendix

CVSS Score
9.3/ 10
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

Affected Systems

@acastellon/auth

Affected Versions Detail

Product
Affected Versions
Fixed Version
@acastellon/auth
@acastellon
< 2.3.02.3.0
AttributeDetail
CWE IDCWE-290
Attack VectorNetwork
CVSS Score9.3 (CVSS v4.0)
EPSS ScoreN/A
ImpactComplete Authentication Bypass
Exploit StatusPoC Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1134Access Token Manipulation
Defense Evasion
T1556Modify Authentication Process
Credential Access
T1078Valid Accounts
Initial Access
CWE-290
Authentication Bypass by Spoofing

The software trusts a spoofable attribute, such as a source IP address, DNS hostname, or HTTP header, to establish identity, allowing attackers to bypass authentication checks.

Known Exploits & Detection

GitHub IssuesVulnerability disclosure in issue #6 detailing validation bypass

Vulnerability Timeline

Vulnerability disclosed and security issue #6 opened on GitHub
2026-06-18
Fixed version 2.3.0 released on npm registry
2026-06-18
GHSA-GFJ5-979R-92PW security advisory published
2026-06-18

References & Sources

  • [1]GitHub Security Advisory Record
  • [2]Official Security Fix Code Comparison
  • [3]Disclosing GitHub Issue #6
  • [4]OSV Entry
  • [5]npm Package Registry Page
  • [6]Project Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•GHSA-QQF5-X7MJ-V43P
8.4

GHSA-QQF5-X7MJ-V43P: SQL Injection Vulnerabilities in Budibase Database Connectors

A technical analysis of SQL injection vulnerabilities affecting Budibase's database connectors for PostgreSQL, Microsoft SQL Server, and MySQL. Due to direct concatenation of schema and table identifiers into raw SQL queries, authenticated administrative users or malicious database schemas can execute arbitrary SQL commands.

Alon Barad
Alon Barad
3 views•8 min read
•about 2 hours ago•GHSA-2JQ4-Q6VV-4CP3
9.6

GHSA-2JQ4-Q6VV-4CP3: Arbitrary File Write via Path Traversal in Crawl4AI Downloads

A critical Arbitrary File Write vulnerability exists in Crawl4AI versions 0.8.9 and below. By manipulating download filenames via Content-Disposition headers or suggested_filename values, attackers can write arbitrary files to any location on the file system, potentially leading to Remote Code Execution.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 2 hours ago•GHSA-R253-R9JW-QG44
10.0

GHSA-R253-R9JW-QG44: Unauthenticated Remote Code Execution in Crawl4AI via Chromium Launch-Argument Injection

A critical unauthenticated remote code execution vulnerability exists in Crawl4AI versions up to 0.8.9. The flaw is caused by improper neutralization of command arguments passed to the Chromium process execution engine via the browser_config.extra_args parameter, enabling remote attackers to execute arbitrary shell commands inside the container.

Alon Barad
Alon Barad
4 views•6 min read
•about 4 hours ago•GHSA-WM69-2PC3-RMMF
8.6

GHSA-wm69-2pc3-rmmf: Unauthenticated Server-Side Request Forgery in Crawl4AI Docker Streaming Crawl Path

An unauthenticated Server-Side Request Forgery (SSRF) vulnerability was identified in the Crawl4AI Docker API server before version 0.9.0. The vulnerability exists because the streaming crawl endpoint (/crawl/stream) and the standard crawl endpoint with streaming enabled (/crawl with crawler_config.stream=true) bypass the validate_url_destination security filter. This allows remote, unauthenticated attackers to execute arbitrary HTTP requests targeting internal infrastructure, loopback interfaces, or cloud metadata endpoints like AWS/GCP services.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 4 hours ago•CVE-2026-12565
5.3

CVE-2026-12565: Arbitrary File Write via Path Traversal in BBOT unarchive Module

CVE-2026-12565 is a medium-severity path traversal (Zip-Slip) vulnerability within the internal unarchive module of the BBOT (Black Lantern Security) OSINT framework. The vulnerability exists due to a failure to validate target paths before extracting archives using host-level command-line utilities. This allows remote, unauthenticated attackers to write arbitrary files outside of the target extraction folder on environments running legacy versions of GNU tar.

Alon Barad
Alon Barad
3 views•7 min read
•about 5 hours ago•CVE-2026-12566
3.1

CVE-2026-12566: Server-Side Request Forgery (SSRF) in Black Lantern Security BBOT docker_pull Module

A Server-Side Request Forgery (SSRF) vulnerability exists in the docker_pull module of Black Lantern Security BBOT. By returning a maliciously crafted WWW-Authenticate header from a rogue Docker registry or executing a Man-in-the-Middle (MitM) attack, an attacker can coerce the BBOT scanner into making arbitrary HTTP requests to internal system services or external infrastructure, potentially disclosing sensitive authorization tokens and host metadata.

Amit Schendel
Amit Schendel
5 views•6 min read