Vulnerabilities in pkg:npm/@hono/oauth-providers
PACKAGECVE-2026-81888 is a MODERATE (CVSS 5.4) remote code execution vulnerability (CWE-1275: Sensitive Cookie with Improper SameSite Attribute) affecting @hono/oauth-providers libraries in the npm ecosystem. The issue involves oauth state check fails open on omitted state, enabling login csrf and forced account linking. Remediation is available by upgrading affected packages to version 0.8.6.
pkg:npm/@hono/oauth-providers
Vulnerability advisories affecting package pkg:npm/@hono/oauth-providers. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fm3f-ch8h-qw8q | CVE-2026-81888 | MODERATE | @hono/oauth-providers: OAuth state check fails open on omitted state, enabling login CSRF and forced account linking |
CVE-2026-81888 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-81888
To remediate this vulnerability, upgrade all affected @hono/oauth-providers dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @hono/oauth-providers@0.8.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @hono/oauth-providers
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-81888, inspect your project dependencies using npm:
npm ls @hono/oauth-providers
Analyze the terminal output to locate any version of @hono/oauth-providers in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.6), your application is affected.
Note: The npm ls @hono/oauth-providers command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1275: Sensitive Cookie with Improper SameSite Attribute, where the samesite attribute for sensitive cookies is not set, or an insecure value is used. In @hono/oauth-providers, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-81888 Affected @hono/oauth-providers Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@hono/oauth-providers
|
npm |
< 0.8.6
|
0.8.6
|
References
Frequently Asked Questions
What is CVE-2026-81888?
Which @hono/oauth-providers versions are affected?
What version fixes CVE-2026-81888?
Is @hono/oauth-providers affected?
What is the CVSS score of CVE-2026-81888?
What CWE is associated with CVE-2026-81888?
How can I check npm dependencies for CVE-2026-81888?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fm3f-ch8h-qw8q",
"modified" : "2026-08-31T20:30:50Z",
"published" : "2026-08-31T20:30:50Z",
"aliases" : [ "CVE-2026-81888" ],
"summary" : "@hono/oauth-providers: OAuth state check fails open on omitted state, enabling login CSRF and forced account linking",
"details" : "### Summary\n\nThe built-in social login providers accept an OAuth callback even when the `state` value is absent on both sides, so the anti-CSRF check passes for a callback that never came from a genuine login attempt. This defeats the `state`-based CSRF protection under default usage.\n\n### Details\n\nThe `state` check treated two absent values as a match, so a callback that omits `state` — and for which no `state` was ever stored — was allowed to redeem the authorization code. Hono's `csrf()` middleware does not help: it only inspects form-style requests, while the OAuth callback is a top-level `GET` navigation it treats as safe.\n\nThis affects the `google`, `github`, `facebook`, `discord`, `twitch`, `linkedin`, and `msentra` providers. The `x` (Twitter) provider is not exploitable due to its PKCE binding.\n\n### Impact\n\nAn attacker can make a victim's browser complete an OAuth callback that binds the attacker's identity instead of the victim's, leading to login CSRF (the victim silently acts inside the attacker's account) or forced account linking (the attacker's identity is linked to the victim's account, enabling later sign-in as the victim). Affects applications using an affected provider on `@hono/oauth-providers` `0.8.5` or earlier.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@hono/oauth-providers"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/honojs/middleware/security/advisories/GHSA-fm3f-ch8h-qw8q"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/middleware/pull/2040"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/middleware/commit/b37765f40b7bddb1d8fce39573b085222dea58c1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/honojs/middleware"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/middleware/releases/tag/%40hono%2Foauth-providers%400.8.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1275", "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-31T20:30:50Z",
"nvd_published_at" : null
}
}