Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

0
High
Published: 07/07/2026 (07/07/2026, 20:55:41 UTC)
Source: GCVE Database
Product: better-auth

Description

The better-auth library versions prior to 1.6.11, when using the legacy oidcProvider or mcp plugins, have insecure cryptographic defaults. These include advertising the 'none' algorithm for ID token signing in the discovery document, which can lead to acceptance of unsigned tokens by relying parties that do not pin algorithms. Additionally, the default acceptance of the PKCE 'plain' code challenge method violates OAuth 2.1 standards and weakens authorization code protection if the authorization URL is exposed. The newer @better-auth/oauth-provider package is not affected. A fix is available in better-auth version 1.6.11 and later.

CVSS v3.1

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N

Affected software

npmghsa
better-auth
Affected versions
<1.6.11

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/08/2026, 13:44:48 UTC

Technical Analysis

The legacy oidcProvider and mcp plugins in better-auth versions before 1.6.11 exhibit two main cryptographic weaknesses: (1) their OIDC discovery documents advertise the 'none' algorithm in id_token_signing_alg_values_supported (and resource_signing_alg_values_supported for mcp), which can cause relying parties that negotiate algorithms from discovery metadata without pinning to accept unsigned tokens; (2) they enable the PKCE 'plain' code challenge method by default, including silently downgrading missing code_challenge_method parameters to 'plain', contrary to OAuth 2.1 RFC 9700 §2.1.1 which forbids 'plain'. The patched version 1.6.11 removes 'none' from discovery metadata, disables plain PKCE by default, and rejects requests missing code_challenge_method. The recommended migration is to @better-auth/oauth-provider, which excludes these insecure defaults.

Potential Impact

Relying parties that do not pin JWT signing algorithms and rely on discovery metadata may accept unsigned tokens, risking token forgery or impersonation. The acceptance of PKCE 'plain' weakens the protection of authorization codes, making interception attacks more feasible if the authorization URL leaks. These issues can lead to compromised authentication flows and elevated risk of unauthorized access.

Mitigation Recommendations

Upgrade to better-auth version 1.6.11 or later, which removes the insecure 'none' algorithm from discovery metadata and disables acceptance of plain PKCE by default. Migrate from the deprecated oidcProvider and mcp plugins to the @better-auth/oauth-provider package, which is not affected by these issues. If immediate upgrade is not possible, explicitly disable plain PKCE by setting allowPlainCodeChallengeMethod to false in oidcProvider or mcp configurations, and override the discovery metadata to exclude 'none' from id_token_signing_alg_values_supported. Verify changes by inspecting the .well-known endpoint. These mitigations align runtime and discovery behavior to secure defaults.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-9h47-pqcx-hjr4
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a4e4ef7c9d9e3dbe328cc0c

Added to database: 07/08/2026, 13:21:59 UTC

Last enriched: 07/08/2026, 13:44:48 UTC

Last updated: 07/09/2026, 03:25:14 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses