CVE-2026-81888: @hono/oauth-providers Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-fm3f-ch8h-qw8q
CVSS 5.4
CWE-1275 CWE-352
Published
Advisory Summary

CVE-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.

CVE-2026-81888 at a Glance

CVE Identifier CVE-2026-81888
GHSA Identifier GHSA-fm3f-ch8h-qw8q
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-1275: Sensitive Cookie with Improper SameSite Attribute
Affected Product @hono/oauth-providers
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

@hono/oauth-providers fixed: 0.8.6
npm install @hono/oauth-providers@0.8.6
Verify Direct and Transitive Dependencies

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

### Summary The 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. ### Details The `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. This affects the `google`, `github`, `facebook`, `discord`, `twitch`, `linkedin`, and `msentra` providers. The `x` (Twitter) provider is not exploitable due to its PKCE binding. ### Impact An 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.

CVE-2026-81888 Affected @hono/oauth-providers Versions

1 component(s)
Fixed Versions:
0.8.6
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?
CVE-2026-81888 is a security vulnerability in @hono/oauth-providers involving OAuth state check fails open on omitted state, enabling login CSRF and forced account linking under CWE-1275: Sensitive Cookie with Improper SameSite Attribute.
Which @hono/oauth-providers versions are affected?
Affected versions include releases prior to 0.8.6 across affected packages: @hono/oauth-providers.
What version fixes CVE-2026-81888?
Upgrading to 0.8.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hono/oauth-providers affected?
Yes, @hono/oauth-providers is affected in releases prior to 0.8.6. Upgrade your dependency to 0.8.6 or later.
What is the CVSS score of CVE-2026-81888?
CVE-2026-81888 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-81888?
CVE-2026-81888 is classified under CWE-1275: Sensitive Cookie with Improper SameSite Attribute (The SameSite attribute for sensitive cookies is not set, or an insecure value is used.).
How can I check npm dependencies for CVE-2026-81888?
Run the dependency tree command: 'npm ls @hono/oauth-providers'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}