CVE-2026-81888
Executive Summary
CVE-2026-81888 is a Cross-Site Request Forgery (CSRF) protection bypass vulnerability affecting the @hono/oauth-providers authentication middleware for the Hono web framework, prior to version 0.8.6. The built-in social login providers fail to validate the presence and equality of the OAuth state parameter on both the client-initiated request and the callback, allowing an attacker to complete an OAuth callback flow without a genuine login attempt. This defeats the anti-CSRF mechanism designed to prevent account linking and unauthorized session establishment. Successful exploitation requires the victim to interact with a crafted link (User Interaction flag is set), but results in a limited confidentiality and integrity impact, potentially allowing an attacker to bind their own OAuth credentials to a victim's account or complete a login flow on the victim's behalf under the attacker's identity. Version 0.8.6 contains the patch. As of the writing of this report, no public exploit code exists, EPSS scoring has not yet been published by FIRST.org, and the vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
CVE-2026-81888 is classified under CWE-352 (Cross-Site Request Forgery). The vulnerability resides in the OAuth 2.0 / OpenID Connect state-validation logic of the @hono/oauth-providers middleware used by applications built on the Hono server framework.
In a standard OAuth 2.0 Authorization Code flow, the client application generates a random state value prior to redirecting the user to the authorization server. This value must be transmitted in the callback request so that the application can verify that the callback corresponds to a login flow the user actually initiated, and not a forged request. This is the primary CSRF mitigation for OAuth endpoints.
According to the NVD description, versions of @hono/oauth-providers prior to 0.8.6 accept an OAuth callback even when the state value is absent on both sides of the transaction — i.e., the middleware does not require the state parameter to be present in the callback query string, and does not compare it against any stored session value. As a result, the anti-CSRF check is effectively a no-op: it passes because the comparison logic lacks a mandatory presence check or fails to abort when the stored state is undefined.
The attack surface is the OAuth callback endpoint(s) exposed by the Hono application (typically a route such as /auth/callback or /login/callback, although specific paths are not disclosed in the NVD description and must not be assumed). Because the state check is bypassed, an attacker can craft a URL that points directly at the callback endpoint with attacker-controlled code and (optionally) state parameters. When a victim clicks the crafted link, the OAuth middleware processes the supplied authorization code and associates the victim's session with whatever identity the code represents.
It is important to note the exact mechanism at the code level is not fully disclosed. The NVD description indicates the state value is "absent on both sides," which suggests the middleware may not have generated or stored a state value in the session in the first place, or fails to require it. The patch in version 0.8.6 introduces mandatory state validation. Insufficient technical detail is available regarding whether the fix requires the state to always be present, or whether it enforces a session-bound nonce comparison.
The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N confirms this is an unauthenticated network attack requiring user interaction, with a scope change to "Unchanged" (U) and limited confidentiality and integrity impact — consistent with an account-linking or login-state tampering issue rather than a full authentication bypass with server-side code execution.
Exploitation Scenarios
Because no public exploit code or PoC is available, the attack chain is inferred from the vulnerability class (CSRF via missing OAuth state validation) and the NVD description. The following scenario is consistent with the data provided.
Step 1 — Reconnaissance / Target Identification: An attacker identifies a Hono-based web application that uses social login via the @hono/oauth-providers middleware. Target identification can be aided by the presence of /auth/* callback routes, social login buttons (e.g., "Sign in with Google"), or the hono/oauth-providers string in page source or server headers. Version fingerprinting may be possible by triggering an error page or inspecting package version exposure, though the latter is unlikely in production.
Step 2 — Triggering the Flaw: The attacker initiates an OAuth Authorization Code flow against the same identity provider (e.g., Google, GitHub, or Discord) used by the target application, using the application's client ID. The attacker receives a valid authorization code from the identity provider. The attacker then constructs a malicious URL pointing to the target application's OAuth callback endpoint, embedding the attacker's code and a fabricated or empty state value.
Step 3 — Payload / Execution Method: The attacker delivers the crafted callback URL to the victim, typically via phishing email, a malicious link on a forum, or an embedded link in a message (CSRF requires user interaction). When the victim, who has an active session with the target application, clicks the link, the browser sends a GET request to the callback endpoint. Because the vulnerable middleware does not validate the presence or correctness of state, the request is processed as a legitimate OAuth callback. The middleware exchanges the attacker-supplied code for tokens and establishes or mutates the victim's session state.
Step 4 — Post-Exploitation Impact: Depending on the application's account-linking logic, the attacker may successfully bind their own external OAuth identity to the victim's existing account, effectively performing an account-takeover "identity binding" attack (AKA "login CSRF" or "social login account linking"). Alternatively, the attacker may force the victim to be signed into the attacker's account, enabling the attacker to later access data the victim submits in that session. The limited integrity (I:L) and confidentiality (C:L) subscores reflect that the attacker likely does not gain direct access to victim credentials but may gain unauthorized access to user-uploaded content, account settings, or protected functionality depending on the application logic.
No public PoC is available; the attack chain above is inferred from the vulnerability class.
Impact Assessment
Business Impact: The primary business risk is unauthorized account linking and login-state manipulation. If the target application handles sensitive user data (PII, financial records, health data), an attacker who successfully binds their identity to a victim's account may gain the ability to view or modify data under the explicit consent of the login flow, bypassing the intended authentication boundary. The impact rating of HIGH confidentiality/integrity should be considered in the context of the application's data sensitivity, even though the CVSS score is moderate (5.4).
Affected Systems: All applications using @hono/oauth-providers versions prior to 0.8.6 with any built-in social login provider enabled are affected. This includes Hono applications running on Bun, Deno, Node.js, or Cloudflare Workers. The vulnerability is inherent to the middleware, not to a specific deployment environment, so all hosting stacks used by Hono are equally exposed.
Blast Radius: The CVSS subscores indicate:
- Attack Vector: Network (AV:N) — remotely exploitable.
- Attack Complexity: Low (AC:L) — no special conditions beyond a GET request.
- Privileges Required: None (PR:N) — unauthenticated attacker.
- User Interaction: Required (UI:R) — victim must click a crafted link.
- Scope: Unchanged (S:U) — the compromise is confined to the application's security context.
- Confidentiality Impact: Low (C:L) — limited data exposure.
- Integrity Impact: Low (I:L) — limited data modification.
- Availability Impact: None (A:N).
CISA KEV Status: Not listed. EPSS: Not yet scored. PoC/Exploit: None publicly available.
Detection Guidance
The following detection content is designed to raise alerts on OAuth callback requests that lack a state parameter, exhibit abnormal callback volume, or match known abuse patterns. These rules are generic enough to avoid high false-positive rates while capturing the specific behavior induced by CVE-2026-81888.
Sigma Rule
title: OAuth Callback Without State Parameter - Possible CVE-2026-81888 Exploitation
id: 4c9f2a3e-7b1d-4e8a-9c3f-2b6d0a1e5f8a
status: experimental
description: Detects OAuth callback requests that lack the state parameter, potentially indicating exploitation of CVE-2026-81888.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-81888
author: ValtersIT-ThreatIntel
date: 2026/06/15
tags:
- attack.t1190
- attack.initial-access
- cve.2026.81888
logsource:
category: webserver
product: generic
detection:
selection:
http.url|contains:
- '/callback'
- '/oauth'
- '/auth'
http.url|endswith|contains: '?code='
filter_has_state:
http.url|contains: 'state='
condition: selection and not filter_has_state
falsepositives:
- Some OAuth providers do not require state by default; however, this is rare in properly configured flows.
- Legacy applications that never implemented state validation.
level: high
YARA Rule
/*
YARA rule for CVE-2026-81888 detection based on mutable code artifacts.
This rule targets code patterns in reverse-engineered middleware or vulnerable
JavaScript bundles where state is accepted even when undefined.
*/
rule CVE_2026_81888_OAuth_State_Bypass
{
meta:
author = "ValtersIT-ThreatIntel"
description = "Detects patterns indicative of vulnerable @hono/oauth-providers state validation logic"
cve = "CVE-2026-81888"
date = "2026-06-15"
severity = "high"
strings:
$a = "state" ascii nocase
$b = "callback" ascii nocase
$c = "token" ascii nocase
$d = "authorizationCode" ascii nocase
$e = "redirect_uri" ascii nocase
$f = "code" ascii nocase
$g = "oauth" ascii nocase
$pattern1 = { 73 74 61 74 65 20 3d 3d 3d 20 75 6e 64 65 66 69 6e 65 64 } /* "state === undefined" */
condition:
uint16(0) == 0x5A4D or // MZ header for Windows executables
uint32(0) == 0x464C457F or // ELF header
filesize < 2MB and
3 of them and
($pattern1)
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (msg:"CVE-2026-81888 - OAuth Callback Missing State Parameter"; flow:established,to_server; content:"GET"; http_method; content:"/callback"; http_uri; nocase; content:"?code="; http_uri; nocase; pcre:"/^(?:(?!state=).)*$/Ui"; reference:cve,2026-81888; classtype:attempted-user; sid:20260681888; rev:1;)
Elastic Detection
EQL (Event Query Language):
sequence by host.name, user.name with maxspan=5m
[ network where dns.question.name : "*" and http.request.method == "GET" ]
[ http where http.request.method == "GET"
and (url.path : "*/callback*" or url.path : "*/oauth*")
and url.query : "*code=*"
and not url.query : "*state=*"
]
Splunk SPL Query
index=web sourcetype=access_combined
| where like(uri_path, "%callback%") AND like(uri_query, "%code=%") AND NOT like(uri_query, "%state=%")
| stats count by src_ip, uri, user_agent, _time
| where count > 5
| sort - _time
| table _time, src_ip, uri, user_agent, count
Wazuh OSSEC Rule
<group name="web, accesslog, oauth,">
<rule id="989760" level="12">
<if_sid>31100, 31122</if_sid>
<field name="url" type="pcre2">(?i)(.*callback.*code=)</field>
<field name="url" type="pcre2">(?i)^(?!.*state=).*$</field>
<description>OAuth callback missing state parameter - CVE-2026-81888 exploitation attempt</description>
<mitre>
<id>T1190</id>
</mitre>
<group>cve-2026-81888</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 0/4 — UNPATCHED — no patch evidence from any tracked source. The vendor advisory for CVE-2026-81888 has not yet been published to the public CVE or vendor databases, and no patch commit has been identified.
1) Immediate Mitigations (until patch is deployed):
- Upgrade immediately: If version 0.8.6 or later is available, upgrade the
@hono/oauth-providerspackage to 0.8.6. This is the only known remediating version. - Disable social login providers that are not business-critical until the upgrade is complete.
- Implement a reverse-proxy layer (e.g., Nginx, Cloudflare Worker) that enforces the presence of
statein all requests to OAuth callback URIs before they reach the application. This can be a temporary stopgap. - Add middleware-level validation manually: inject a custom Hono middleware that checks for the
stateparameter and compares it to a server-side session cookie, rejecting requests without it. This effectively bypasses the library's flawed logic. - Educate users about phishing links that point to the login callback URL. The user interaction requirement reduces but does not eliminate the risk.
2) Patch / Upgrade Steps:
- Upgrade the package in the application environment:
npm install @hono/oauth-providers@0.8.6(or the equivalent command for Bun/Deno package managers). - Re-run test suites for all social login flows to validate that the
stateparameter is now mandatory. - Review application logs after deployment to confirm no abnormal callback requests occur.
3) Long-Term Hardening:
- Always implement PKCE (Proof Key for Code Exchange) in OAuth flows in addition to
state; PKCE provides an additional CSRF mitigation. - Ensure single-use authorization codes and short token lifetimes are enforced.
- Perform regular security audits of all third-party middleware dependencies.
- Monitor vendor channels and NVD for updates to CVE-2026-81888, as MITRE data suggests the patch is in version 0.8.6 but a formal advisory may still be pending.
References
- NVD Entry for CVE-2026-81888: https://nvd.nist.gov/vuln/detail/CVE-2026-81888
- @hono/oauth-providers package page (NPM): https://www.npmjs.com/package/@hono/oauth-providers (version history confirms 0.8.6 release)
- Hono Framework Official Site / Documentation: https://hono.dev (for middleware usage and deployment context)
- OWASP Cross-Site Request Forgery Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html (background on CSRF and OAuth state)
- CISA Known Exploited Vulnerabilities Catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (listed: NO — verified as of report date)
Exploit-in-the-wild evidence: None. No public exploit code, Nuclei templates, or threat actor campaigns referencing CVE-2026-81888 have been identified at the time of writing. EPSS score has not yet been published by FIRST.org.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.