better-auth@1.3.34 vulnerabilities

The most comprehensive authentication framework for TypeScript.

  • latest version

    1.4.5

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    6 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
    • 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
    • H
    Session Fixation

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

    Affected versions of this package are vulnerable to Session Fixation via the constantTimeEqual function in the crypto/buffer.ts file. An attacker can cause arbitrary user sessions to be revoked by forging cookies containing another user's session token and triggering the sign-out handler.

    How to fix Session Fixation?

    Upgrade better-auth to version 1.4.0 or higher.

    >=1.3.34 <1.4.0