Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. GHSA-9h47-pqcx-hjr4

GHSA-9h47-pqcx-hjr4: Better Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by default

July 7, 2026

The legacy oidcProvider and mcp plugins exhibit two related defects in their OIDC discovery and authorize surfaces.

The discovery document advertises "none" in id_token_signing_alg_values_supported (and, for mcp, in resource_signing_alg_values_supported on the OAuth protected-resource metadata). Any relying party that performs algorithm negotiation from this metadata without pinning to a real signing algorithm may accept unsigned tokens.

PKCE plain is enabled by default. The runtime gate in the authorize handler accepts code_challenge_method=plain under this default, and a missing code_challenge_method parameter is silently downgraded to "plain" before the allowlist check. Discovery advertises code_challenge_methods_supported: ["S256"], contradicting the runtime acceptance of plain. RFC 9700 §2.1.1 (OAuth 2.1) explicitly forbids plain.

References

  • github.com/advisories/GHSA-9h47-pqcx-hjr4
  • github.com/better-auth/better-auth/releases/tag/v1.6.11
  • github.com/better-auth/better-auth/security/advisories/GHSA-9h47-pqcx-hjr4

Code Behaviors & Features

Detect and mitigate GHSA-9h47-pqcx-hjr4 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.11

Fixed versions

  • 1.6.11

Solution

Upgrade to version 1.6.11 or above.

Impact 8.7 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-1188: Initialization of a Resource with an Insecure Default
  • CWE-327: Use of a Broken or Risky Cryptographic Algorithm
  • CWE-757: Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')

Source file

npm/better-auth/GHSA-9h47-pqcx-hjr4.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 13 Jul 2026 00:20:29 +0000.