Description
Improper Encoding or Escaping of Output vulnerability in ash-project ash_authentication_oauth2_server allows an unauthenticated attacker to inject arbitrary authentication parameters into the WWW-Authenticate challenge header.

BearerPlug and RequireScopePlug built the Bearer resource_metadata="..." challenge by interpolating a resource_metadata URL derived from the request tenant directly into the quoted value. In a multi-tenant application that sets the Ash tenant from request-controlled data (a subdomain, the Host, a path segment, or a header), a tenant containing a " closes the quoted value and appends attacker-chosen auth-params, including a second resource_metadata URL pointing at an attacker-controlled authorization server that spec-following clients follow. Carriage returns and line feeds are rejected by Plug, so this is parameter injection within one header, not response splitting.

This issue affects ash_authentication_oauth2_server: from 0.1.3 before 0.3.1.
Published: 2026-09-07
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw lies in improper encoding or escaping of the WWW‑Authenticate header. The server constructs a Bearer challenge that includes a resource_metadata URL derived from the tenant identifier. Because the tenant value is incorporated directly into a quoted string without sanitization, a tenant name containing a double quote can close the quote and append attacker‑chosen parameters. The attacker can thus inject arbitrary authentication directives, including a resource_metadata pointing to a malicious authorization server. This type of header injection can mislead OAuth‑aware clients into following a forged authorization flow, potentially exposing user credentials or enabling session hijacking. The weakness corresponds to CWE‑116: Improper Encoding or Escaping.

Affected Systems

The vulnerability affects the open‑source project ash‑authentication‑oauth2‑server, version range 0.1.3 through 0.3.0 inclusive. Any deployment of this library that has not updated to 0.3.1 or later is susceptible. The issue was identified in the BearerPlug and RequireScopePlug components that build the challenge string.

Risk and Exploitability

The attack can be launched by any unauthenticated client that controls the tenant value, such as subdomains, host headers, path segments, or custom headers. Because the vulnerability occurs in a response header, a malicious actor could influence the authentication flow without prior authentication. The exploit requires only a crafted HTTP request, so the risk is medium to high for applications exposed to the internet, particularly in multi‑tenant configurations. The CVSS score of 6.3 indicates significant impact, while the lack of an EPSS score means that no specific exploitation likelihood estimate is available. The vulnerability is not listed in the CISA KEV catalog, indicating no wide‑scale exploitation has been reported yet, but the potential for misuse remains clear.

Generated by OpenCVE AI on September 7, 2026 at 23:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade ash‑authentication‑oauth2‑server to version 0.3.1 or later, which removes the insecure header construction code.
  • Validate or sanitize tenant identifiers before use, rejecting or escaping any characters that could terminate or alter quoted header values, such as double quotes.
  • Restrict resource_metadata URLs to a whitelist of known, trusted authorization servers or enforce strict validation of redirect URLs to prevent malicious redirection.

Generated by OpenCVE AI on September 7, 2026 at 23:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 07 Sep 2026 22:45:00 +0000

Type Values Removed Values Added
Description Improper Encoding or Escaping of Output vulnerability in ash-project ash_authentication_oauth2_server allows an unauthenticated attacker to inject arbitrary authentication parameters into the WWW-Authenticate challenge header. BearerPlug and RequireScopePlug built the Bearer resource_metadata="..." challenge by interpolating a resource_metadata URL derived from the request tenant directly into the quoted value. In a multi-tenant application that sets the Ash tenant from request-controlled data (a subdomain, the Host, a path segment, or a header), a tenant containing a " closes the quoted value and appends attacker-chosen auth-params, including a second resource_metadata URL pointing at an attacker-controlled authorization server that spec-following clients follow. Carriage returns and line feeds are rejected by Plug, so this is parameter injection within one header, not response splitting. This issue affects ash_authentication_oauth2_server: from 0.1.3 before 0.3.1.
Title ash_authentication_oauth2_server interpolates a tenant-derived value into the WWW-Authenticate challenge without escaping, allowing header parameter injection
First Time appeared Ash-project
Ash-project ash Authentication Oauth2 Server
Weaknesses CWE-116
CPEs cpe:2.3:a:ash-project:ash_authentication_oauth2_server:*:*:*:*:*:*:*:*
Vendors & Products Ash-project
Ash-project ash Authentication Oauth2 Server
References
Metrics cvssV4_0

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


Subscriptions

Ash-project Ash Authentication Oauth2 Server
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-09-07T22:30:55.280Z

Reserved: 2026-08-31T01:00:10.817Z

Link: CVE-2026-82756

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-07T23:16:52.770

Modified: 2026-09-07T23:16:52.770

Link: CVE-2026-82756

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-07T23:30:17Z

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output