Skip to content
Heist/ feed
Back to feed
Medium

Beter Auth has an Open Redirect via Scheme-Less Callback Parameter

Type: advisorySources: OSV

Better Auth is an authentication and authorization library for TypeScript. Prior to version 1.1.21, the application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs, it incorrectly allows scheme-less URLs. This results in the browser interpreting the URL as a fully qualified URL, leading to unintended redirection. An attacker can exploit this flaw by crafting a malicious verification link and tricking users into clicking it. Upon successful email verification, the user will be automatically redirected to the attacker's website, which can be used for phishing, malware distribution, or stealing sensitive authentication tokens. This CVE is a bypass of the fix for GHSA-8jhw-6pjj-8723/CVE-2024-56734. Version 1.1.21 contains an updated patch.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-27143
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 04:01 UTC · Revision 1

Source evidence

Beter Auth has an Open Redirect via Scheme-Less Callback Parameter

core-osv · Original source

Published 24 Feb 2025, 22:16 UTC

Better Auth is an authentication and authorization library for TypeScript. Prior to version 1.1.21, the application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs, it incorrectly allows scheme-less URLs. This results in the browser interpreting the URL as a fully qualified URL, leading to unintended redirection. An attacker can exploit this flaw by crafting a malicious verification link and tricking users into clicking it. Upon successful email verification, the user will be automatically redirected to the attacker's website, which can be used for phishing, malware distribution, or stealing sensitive authentication tokens. This CVE is a bypass of the fix for GHSA-8jhw-6pjj-8723/CVE-2024-56734. Version 1.1.21 contains an updated patch.

osv:CVE-2025-27143
Complete source record
{
  "id": "a11d2cdb83ce6c2af2fe5e075dee3a15a89079517a9f7bcb4d6b41c457e14b39",
  "url": "https://osv.dev/vulnerability/CVE-2025-27143",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Beter Auth has an Open Redirect via Scheme-Less Callback Parameter",
    "summary": "Better Auth is an authentication and authorization library for TypeScript. Prior to version 1.1.21, the application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs, it incorrectly allows scheme-less URLs. This results in the browser interpreting the URL as a fully qualified URL, leading to unintended redirection. An attacker can exploit this flaw by crafting a malicious verification link and tricking users into clicking it. Upon successful email verification, the user will be automatically redirected to the attacker's website, which can be used for phishing, malware distribution, or stealing sensitive authentication tokens. This CVE is a bypass of the fix for GHSA-8jhw-6pjj-8723/CVE-2024-56734. Version 1.1.21 contains an updated patch.",
    "evidence": "osv:CVE-2025-27143",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-27143",
      "aliases": [
        "CVE-2025-27143",
        "GHSA-hjpm-7mrm-26w8"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/better-auth/better-auth",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4c5f0c279f2c6ebb97df8b1be01fade4d08d9f26"
                },
                {
                  "fixed": "24659aefc35a536b95ea4e5347e52c8803910153"
                },
                {
                  "fixed": "b381cac7aafd6aa53ef78b6ab771ebfa24643c80"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.1.21"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "24659aefc35a536b95ea4e5347e52c8803910153"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b381cac7aafd6aa53ef78b6ab771ebfa24643c80"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4c5f0c279f2c6ebb97df8b1be01fade4d08d9f26"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.1.21"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.1.20-beta.3",
            "v1.1.20-beta.2",
            "v1.1.20-beta.1",
            "v1.1.19",
            "v1.1.19-beta.3",
            "v1.1.19-beta.2",
            "v1.1.19-beta.1",
            "v1.1.18",
            "v1.1.18-beta.3",
            "v1.1.18-beta.2",
            "v1.1.18-beta.1",
            "v1.1.17",
            "v1.1.17-beta.5",
            "v1.1.17-beta.3",
            "v1.1.17-beta.2",
            "v1.1.17-beta.1",
            "v1.1.16",
            "v1.1.16-beta.10",
            "v1.1.16-beta.9",
            "v1.1.16-beta.8",
            "v1.1.16-beta.7",
            "v1.1.16-beta.4",
            "v1.1.16-beta.3",
            "v1.1.15",
            "v1.1.15-beta.7",
            "v1.1.15-beta.6",
            "v1.1.15-beta.5",
            "v1.1.15-beta.4",
            "v1.1.15-beta.3",
            "v1.1.15-beta.2",
            "v1.1.15-beta.1",
            "v1.1.14",
            "v1.1.14-beta.6",
            "v1.1.14-beta.5",
            "v1.1.14-beta.4",
            "v1.1.14-beta.3",
            "v1.1.14-beta.2",
            "v1.1.14-beta.1",
            "v1.1.13",
            "v1.1.13-beta.3",
            "v1.1.13-beta.2",
            "v1.1.13-beta.1",
            "v1.1.12",
            "v1.1.12-beta.4",
            "v1.1.12-beta.3",
            "v1.1.12-beta.2",
            "v1.1.11",
            "v1.1.11-beta.1",
            "v1.1.10",
            "v1.1.10-beta.2",
            "v1.1.10-beta.1",
            "v1.1.9",
            "v1.1.9-beta.1",
            "v1.1.8",
            "v1.1.8-beta.3",
            "v1.1.8-beta.2",
            "v1.1.8-beta.1",
            "v1.1.7",
            "v1.1.6",
            "v1.1.5",
            "v1.1.4",
            "v1.1.4-beta.2",
            "v1.1.4-beta.1",
            "v1.1.3",
            "v1.1.3-beta.6",
            "v1.1.2",
            "v1.1.2-beta.4",
            "v1.1.2-beta.3",
            "v1.1.2-beta.2",
            "v1.1.2-beta.1",
            "v1.1.1",
            "v1.1.0",
            "v1.0.23-beta.6",
            "v1.0.23-beta.2",
            "v1.0.22",
            "v1.0.22-beta.4",
            "v1.0.22-beta.3",
            "v1.0.22-beta.2",
            "v1.0.22-beta.1",
            "v1.0.21",
            "v1.0.20",
            "v1.0.19",
            "v1.0.18",
            "v1.0.17",
            "v1.0.16",
            "v1.0.16-beta.2",
            "v1.0.16-beta.1",
            "v1.0.15",
            "v1.0.14",
            "v1.0.13",
            "v1.0.12",
            "v1.0.12-beta.3",
            "v1.0.12-beta.2",
            "v1.0.12-beta.1",
            "v1.0.11",
            "v1.0.11-beta.8",
            "v1.0.11-beta.7",
            "v1.0.11-beta.6",
            "v1.0.11-beta.5",
            "v1.0.11-beta.4",
            "v1.0.11-beta.2",
            "v1.0.10",
            "v1.0.10-beta.3",
            "v1.0.10-beta.2",
            "v1.0.10-beta.1",
            "v1.0.9",
            "v1.0.9-beta.7",
            "v1.0.9-beta.6",
            "v1.0.9-beta.5",
            "v1.0.9-beta.3",
            "v1.0.9-beta.1",
            "v1.0.8",
            "v1.0.8-beta.4",
            "v1.0.8-beta.2",
            "v1.0.8-beta.1",
            "v1.0.7",
            "v1.0.6",
            "v1.0.5",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v0.8.9-beta.2",
            "v0.8.8",
            "v0.8.8-beta.2",
            "v0.8.8-beta.1",
            "v0.8.7-beta.5",
            "v0.8.7-beta.3",
            "v0.8.7-beta.2",
            "v0.8.7-beta.1",
            "v0.8.6-beta.6",
            "v0.8.6-beta.3",
            "v0.8.6-beta.2",
            "v0.8.6-beta.1",
            "v0.8.5",
            "v0.8.5-beta.3",
            "v0.8.5-beta.2",
            "v0.8.5-beta.1",
            "v0.8.4",
            "v0.8.4-beta.7",
            "v0.8.4-beta.6",
            "v0.8.4-beta.5",
            "v0.8.4-beta.4",
            "v0.8.3-beta.6",
            "v0.8.3-beta.5",
            "v0.8.3-beta.4",
            "v0.8.3-beta.3",
            "v0.8.2",
            "v0.8.2-beta.3",
            "v0.8.2-beta.1",
            "v0.8.1",
            "v0.8.1-beta.5",
            "v0.8.1-beta.4",
            "v0.8.1-beta.3",
            "v0.8.1-beta.2",
            "v0.8.1-beta.1",
            "v0.8.0",
            "v0.7.6-beta.4",
            "v0.7.6-beta.3",
            "v0.7.6-beta.2",
            "v0.7.6-beta.1",
            "v0.7.5",
            "v0.7.5-beta.9",
            "v0.7.5-beta.8",
            "v0.7.5-beta.7",
            "v0.7.5-beta.6",
            "v0.7.5-beta.5",
            "v0.7.5-beta.4",
            "v0.7.5-beta.3",
            "v0.7.5-beta.2",
            "v0.7.5-beta.1",
            "v0.7.4",
            "v0.7.3",
            "v0.7.3-beta.11",
            "v0.7.3-beta.9",
            "v0.7.3-beta.8",
            "v0.7.3-beta.7",
            "v0.7.3-beta.6",
            "v0.7.3-beta.5",
            "v0.7.3-beta.4",
            "v0.7.3-beta.3",
            "v0.7.3-beta.2",
            "v0.7.3-beta.1",
            "v0.7.2",
            "v0.7.2-beta.5",
            "v0.7.2-beta.4",
            "v0.7.1",
            "v0.7.1-beta.6",
            "v0.7.1-beta.4",
            "v0.7.1-beta.3",
            "v0.7.1-beta.1",
            "v0.7.0",
            "v0.7.0-beta.1",
            "v0.6.3-beta.5",
            "v0.6.2",
            "v0.6.2-beta.8",
            "v0.6.1",
            "v0.6.1-beta.9",
            "v0.6.1-beta.7",
            "v0.6.1-beta.5",
            "v0.6.1-beta.4",
            "v0.6.1-beta.3",
            "v0.6.1-beta.2",
            "v0.6.1-beta.1",
            "v0.6.0",
            "v0.6.0-beta.1",
            "v0.5.4-beta.6",
            "v0.5.4-beta.5",
            "v0.5.4-beta.4",
            "v0.5.4-beta.3",
            "v0.5.3",
            "v0.5.3-beta.17",
            "v0.5.3-beta.16",
            "v0.5.3-beta.15",
            "v0.5.3-beta.13",
            "v0.5.3-beta.11",
            "v0.5.3-beta.9",
            "v0.5.3-beta.8",
            "v0.5.3-beta.7",
            "v0.5.3-beta.6",
            "v0.5.3-beta.5",
            "v0.5.3-beta.4",
            "v0.5.3-beta.3",
            "v0.5.3-beta.2",
            "v0.5.3-beta.1",
            "v0.5.2-beta.20",
            "v0.5.2-beta.18",
            "v0.5.2-beta.17",
            "v0.5.2-beta.16",
            "v0.5.2-beta.14",
            "v0.5.2-beta.13",
            "v0.5.2-beta.12",
            "v0.5.2-beta.11",
            "v0.5.2-beta.10",
            "v0.5.2-beta.9",
            "v0.5.2-beta.8",
            "v0.5.2-beta.7",
            "v0.5.2-beta.6",
            "v0.5.2-beta.5",
            "v0.5.2-beta.2",
            "v0.5.1",
            "v0.5.1-beta.6",
            "v0.5.1-beta.5",
            "v0.5.1-beta.4",
            "v0.5.1-beta.3",
            "v0.5.1-beta.2",
            "v0.5.1-beta.1",
            "v0.5.0",
            "v0.4.14-beta.2",
            "v0.4.14-beta.1",
            "v0.4.13",
            "v0.4.12",
            "v0.4.12-beta.7",
            "v0.4.12-beta.5",
            "v0.4.12-beta.4",
            "v0.4.12-beta.3",
            "v0.4.12-beta.2",
            "v0.4.12-beta.1",
            "v0.4.11",
            "v0.4.11-beta.3",
            "v0.4.11-beta.2",
            "v0.4.11-beta.1",
            "v0.4.10",
            "v0.4.10-beta.5",
            "v0.4.10-beta.4",
            "v0.4.9-beta.11",
            "v0.4.9-beta.7",
            "v0.4.9-beta.10",
            "v0.4.9-beta.9",
            "v0.4.9-beta.8",
            "v0.4.9-beta.6",
            "v0.4.9-beta.5",
            "v0.4.9-beta.4",
            "v0.4.9-beta.3",
            "v0.4.9-beta.2",
            "v0.4.9-beta.1",
            "v0.4.8",
            "v0.4.7",
            "v0.4.7-beta.2",
            "v0.4.7-beta.1",
            "v0.4.5",
            "v0.4.4",
            "v0.4.4-beta.1",
            "v0.4.3",
            "v0.4.3-beta.1",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.6",
            "v0.3.5",
            "v0.3.5-beta.8",
            "v0.3.5-beta.7",
            "v0.3.5-beta.6",
            "v0.3.5-beta.5",
            "v0.3.5-beta.4",
            "v0.3.5-beta.2",
            "v0.3.5-beta.1",
            "v0.3.4",
            "v0.3.4-beta.6",
            "v0.3.4-beta.2",
            "v0.3.4-beta.1",
            "v0.3.3",
            "v0.3.3-beta.12",
            "v0.3.3-beta.11",
            "v0.3.3-beta.10",
            "v0.3.3-beta.9",
            "v0.3.3-beta.8",
            "v0.3.3-beta.5",
            "v0.3.3-beta.4",
            "v0.3.3-beta.3",
            "v0.3.3-beta.2",
            "v0.3.3-beta.1",
            "v0.3.2",
            "v0.3.0",
            "v0.2.11",
            "v0.2.10",
            "v0.2.9",
            "v0.2.9-beta.9",
            "v0.2.9-beta.8",
            "v0.2.9-beta.7",
            "v0.2.9-beta.6",
            "v0.2.9-beta.5",
            "v0.2.9-beta.4",
            "v0.2.9-beta.2",
            "v0.2.9-beta.1",
            "v0.2.8",
            "v0.2.8-beta.13",
            "v0.2.8-beta.12",
            "v0.2.8-beta.11",
            "v0.2.8-beta.10",
            "v0.2.8-beta.9",
            "v0.2.8-beta.8",
            "v0.2.8-beta.1",
            "v0.2.6",
            "v0.2.6-beta.10",
            "v0.2.6-beta.9",
            "v0.2.6-beta.8",
            "v0.2.6-beta.7",
            "v0.2.6-beta.6",
            "v0.2.6-beta.5",
            "v0.2.6-beta.4",
            "v0.2.6-beta.3",
            "v0.2.6-beta.1",
            "v0.2.5",
            "v0.2.5-beta.4",
            "v0.2.5-beta.3",
            "v0.2.5-beta.1",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.1-beta.1",
            "v0.1.1-beta.6",
            "v0.1.1-beta.5",
            "v0.1.1-beta.4",
            "v0.1.1-beta.2",
            "v0.1.1-beta.1",
            "v0.1.0",
            "v0.0.10-beta.27",
            "v0.0.10-beta.26",
            "v0.0.10-beta.25",
            "v0.0.10-beta.24",
            "v0.0.10-beta.23",
            "v0.0.10-beta.22",
            "v0.0.10-beta.21",
            "v0.0.10-beta.20",
            "v0.0.10-beta.19",
            "v0.0.10-beta.18",
            "v0.0.10-beta.17",
            "v0.0.10-beta.16",
            "v0.0.10-beta.15",
            "v0.0.10-beta.14",
            "v0.0.10-beta.13",
            "v0.0.10-beta.12",
            "v0.0.10-beta.11",
            "v0.0.10-beta.10",
            "v0.0.10-beta.9",
            "v0.0.10-beta.8",
            "v0.0.10-beta.7",
            "v0.0.10-beta.6",
            "v0.0.10-beta.5",
            "v0.0.10-beta.4",
            "v0.0.10-beta.3",
            "v0.0.10-beta.2",
            "v0.0.10-beta.1",
            "v0.0.9",
            "v0.0.9-beta.38",
            "v0.0.9-beta.37",
            "v0.0.9-beta.36",
            "v0.0.9-beta.35",
            "v0.0.9-beta.34",
            "v0.0.9-beta.33",
            "v0.0.9-beta.32",
            "v0.0.9-beta.31",
            "v0.0.9-beta.30",
            "v0.0.9-beta.29",
            "v0.0.9-beta.28",
            "v0.0.9-beta.27",
            "v0.0.9-beta.26",
            "v0.0.9-beta.25",
            "v0.0.9-beta.24",
            "v0.0.9-beta.23",
            "v0.0.9-beta.22",
            "v0.0.9-beta.21",
            "v0.0.9-beta.20",
            "v0.0.9-beta.19",
            "v0.0.9-beta.18",
            "v0.0.9-beta.17",
            "v0.0.9-beta.16",
            "v0.0.9-beta.15",
            "v0.0.9-beta.14",
            "v0.0.9-beta.13",
            "v0.0.9-beta.12",
            "v0.0.9-beta.11",
            "v0.0.9-beta.10",
            "v0.0.9-beta.9",
            "v0.0.9-beta.8",
            "v0.0.9-beta.7",
            "v0.0.9-beta.6",
            "v0.0.9-beta.5",
            "v0.0.9-beta.4",
            "v0.0.9-beta.3",
            "v0.0.9-beta.2",
            "v0.0.9-beta.1",
            "v0.0.8",
            "v0.0.8-beta.29",
            "v0.0.8-beta.28",
            "v0.0.8-beta.27",
            "v0.0.8-beta.26",
            "v0.0.8-beta.25",
            "v0.0.8-beta.8",
            "v0.0.8-beta.24",
            "v0.0.8-beta.23",
            "v0.0.8-beta.22",
            "v0.0.8-beta.21",
            "v0.0.8-beta.20",
            "v0.0.8-beta.19",
            "v0.0.8-beta.18",
            "v0.0.8-beta.17",
            "v0.0.8-beta.16",
            "v0.0.8-beta.15",
            "v0.0.8-beta.14",
            "v0.0.8-beta.13",
            "v0.0.8-beta.12",
            "v0.0.8-beta.11",
            "v0.0.8-beta.10",
            "v0.0.8-beta.9",
            "v0.0.8-beta.7",
            "v0.0.8-beta.6",
            "v0.0.8-beta.5",
            "v0.0.8-beta.4",
            "v0.0.8-beta.3",
            "v0.0.8-beta.2",
            "v0.0.8-beta.1",
            "v0.0.7",
            "v0.0.6",
            "v0.0.5",
            "v0.0.4",
            "v0.0.3",
            "v0.0.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-27143.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.669452214Z",
      "provider": "osv",
      "references": [
        "https://github.com/better-auth/better-auth/releases/tag/v1.1.21",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/27xxx/CVE-2025-27143.json",
        "https://github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723",
        "https://github.com/better-auth/better-auth/security/advisories/GHSA-hjpm-7mrm-26w8",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-27143",
        "https://github.com/better-auth/better-auth/commit/24659aefc35a536b95ea4e5347e52c8803910153",
        "https://github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-601"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/27xxx/CVE-2025-27143.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-27143",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492349,
  "published_at": "2025-02-24T22:16:55.224+00:00"
}