CVE-2026-16336
Wolfi vulnerability analysis and mitigation

Overview

CVE-2026-16336 is an open redirect vulnerability in trinodb Trino 481, affecting the OAuth2/OIDC authentication component. The flaw resides in core/trino-main/src/main/java/io/trino/server/ExternalUriInfo.java, where the redirect_uri parameter is derived from untrusted request context without server-side validation or allowlisting. The vulnerability was reported via a GitHub issue on June 4, 2026, and published to NVD and the GitHub Advisory Database on July 21, 2026; the Trino project had not responded at time of disclosure. It carries a CVSS v3.1 score of 4.3 (Medium) and a CVSS v4.0 score of 5.3 (Medium) (Github Advisory, Trino Issue).

Technical details

The root cause is CWE-601 (URL Redirection to Untrusted Site / Open Redirect): Trino dynamically constructs the OAuth2/OIDC callback URI from the incoming HTTP request context — including headers such as X-Forwarded-Host, X-Forwarded-Proto, and X-Forwarded-Prefix — and passes it directly as the redirect_uri to the Identity Provider (IdP) without validating it against a configured canonical allowlist (Trino Issue). The affected code paths include OAuth2WebUiAuthenticationFilter.java (Web UI OAuth challenge) and OAuth2TokenExchangeResource.java (CLI/external token exchange), both of which call ExternalUriInfo.java to resolve the base URI. An attacker who can influence the externally observed request URI — for example by manipulating forwarded headers through a misconfigured reverse proxy — can cause Trino to send an OAuth authorization request with an attacker-controlled redirect_uri. Exploitation is conditional on the IdP accepting the manipulated redirect_uri for Trino's client_id (e.g., due to wildcard or loose redirect URI matching in the IdP configuration) (Trino Issue, Github Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to redirect a victim user to an attacker-controlled website during the OAuth2/OIDC authentication flow, enabling credential theft, phishing, or OAuth authorization code interception (Github Advisory). If the attacker captures the authorization code, they may be able to forward it back to Trino's legitimate callback endpoint and have Trino exchange it using its configured client credentials, potentially gaining unauthorized access to the Trino instance and the data it queries (Trino Issue). The impact is primarily an integrity concern (low) with no direct confidentiality or availability impact on the Trino system itself, though downstream credential compromise could lead to broader data access.

Exploitation steps

  1. Reconnaissance: Identify a publicly accessible Trino 481 instance with OAuth2/OIDC authentication enabled. Confirm the deployment uses a reverse proxy or load balancer that forwards X-Forwarded-Host, X-Forwarded-Proto, or X-Forwarded-Prefix headers to Trino.
  2. Assess IdP configuration: Determine whether the configured Identity Provider uses wildcard, prefix, or subdomain matching for allowed redirect_uri values associated with Trino's OAuth client_id, which would permit attacker-controlled URIs.
  3. Craft malicious request: Send an HTTP request to Trino's OAuth2 authentication endpoint (e.g., the Web UI login or CLI token exchange endpoint) with manipulated forwarded headers (e.g., X-Forwarded-Host: attacker.example.com) to influence the dynamically constructed redirect_uri.
  4. Deliver phishing link: Distribute the crafted Trino OAuth login URL to a target victim (e.g., a legitimate Trino user). When the victim clicks the link and initiates the OAuth flow, Trino constructs a redirect_uri pointing to the attacker-controlled domain and sends it to the IdP.
  5. Capture authorization code: If the IdP accepts the manipulated redirect_uri, it redirects the victim's browser — along with the OAuth authorization code and state — to the attacker's server after successful authentication.
  6. Exploit captured code: Optionally forward the captured authorization code and state to Trino's legitimate callback endpoint to authenticate as the victim, or use the code directly for further attacks (Trino Issue, Github Advisory).

Indicators of compromise

  • Network: OAuth authorization requests from Trino to the IdP containing a redirect_uri pointing to an unexpected or external domain; outbound redirects from the IdP to domains not matching the configured Trino callback URL.
  • Logs: Trino access logs showing OAuth/OIDC callback requests originating from unexpected hosts or with unusual X-Forwarded-Host / X-Forwarded-Proto / X-Forwarded-Prefix header values; IdP audit logs recording authorization code issuance to unrecognized redirect_uri values registered under Trino's client_id.
  • Application: OAuth state parameters appearing in requests to external or attacker-controlled domains rather than the canonical Trino callback endpoint (/oauth2/callback or equivalent).

Mitigation and workarounds

A patch is referenced in GitHub Advisory GHSA-rf2w-6p6m-3cqv; users should apply the available fix and monitor the Trino GitHub repository for an official patched release (Github Advisory). As a configuration-based workaround, administrators should configure the Identity Provider to enforce exact (not wildcard or prefix) redirect_uri matching for Trino's OAuth client_id, restricting accepted URIs to the canonical Trino callback URL including scheme, host, port, and path (Trino Issue). Additionally, reverse proxy configurations should be hardened to strip or validate X-Forwarded-Host, X-Forwarded-Proto, and X-Forwarded-Prefix headers before they reach Trino, preventing attacker influence over the dynamically constructed callback URI. Ideally, Trino should be configured with a canonical external OAuth callback URI that is validated server-side rather than derived from request context.

Community reactions

The vulnerability was initially reported by researcher 0Xrry via a GitHub issue on June 4, 2026, with a detailed technical description of the affected code paths and security impact (Trino Issue). As of the disclosure date (July 21, 2026), the Trino project had not publicly responded to the issue report. No significant broader media coverage or notable community commentary beyond the initial issue and advisory publication has been observed.

Additional resources


SourceThis report was generated using AI

Related Wolfi vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64624HIGH8.5
  • Wolfi logoWolfi
  • freerdp-libs
NoYesJul 20, 2026
CVE-2026-35591HIGH7
  • Wolfi logoWolfi
  • vips
NoYesJul 20, 2026
CVE-2026-35590MEDIUM6.8
  • Wolfi logoWolfi
  • vips
NoYesJul 20, 2026
CVE-2026-33328MEDIUM6.8
  • Wolfi logoWolfi
  • vips
NoYesJul 20, 2026
CVE-2026-16336MEDIUM5.3
  • Wolfi logoWolfi
  • trino
NoNoJul 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management