better-auth@1.3.31

The most comprehensive authentication framework for TypeScript.

  • latest version

    1.6.9

  • latest non vulnerable version

  • first published

    2 years ago

  • latest version published

    10 days ago

  • licenses detected

    • >=1.2.9-beta.9
  • Direct Vulnerabilities

    Known vulnerabilities in the better-auth package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Authentication Bypass Using an Alternate Path or Channel

    better-auth is a The most comprehensive authentication library for TypeScript.

    Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel in the session.cookieCache component. An attacker can gain unauthorized access to protected application routes by leveraging a session that is cached as valid before all authentication steps, such as two-factor authentication, are completed.

    Note:

    This is only exploitable if both two-factor authentication and session cookie caching are enabled.

    How to fix Authentication Bypass Using an Alternate Path or Channel?

    Upgrade better-auth to version 1.4.9 or higher.

    <1.4.9
    • M
    External Control of File Name or Path

    better-auth is a The most comprehensive authentication library for TypeScript.

    Affected versions of this package are vulnerable to External Control of File Name or Path via the getBaseURL function. An attacker can cause all routes to return 404 errors for all users by sending a crafted first request with manipulated X-Forwarded-Host and X-Forwarded-Proto headers, which poisons the router's basePath.

    Note: This is only exploitable if the baseURL is not explicitly configured and the attacker is able to make the very first request to the server after startup.

    How to fix External Control of File Name or Path?

    Upgrade better-auth to version 1.4.3 or higher.

    <1.4.3