{"id":"EUVD-2026-33073","revision":null,"records":[{"revision":"1d221599300747cf8e5695d96b5bcbee","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-45364","aliases":[],"title":"Better Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotation","description":"Better Auth is an authentication and authorization library for TypeScript. Prior to 1.4.17 and 1.5.0-beta.9, Better Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in x-forwarded-for (or the configured IP-bearing header). IPv6 clients controlling a typical /64 allocation could rotate through 2^64 distinct source addresses without exhausting the per-address counter, defeating rate limiting on /sign-in/email, /sign-up/email, /forget-password, and every other path the limiter protects. The same bug allowed a single client to vary the textual encoding of one IPv6 address (uppercase, compression, IPv4-mapped, hex-encoded IPv4-in-IPv6) and produce multiple distinct keys. This vulnerability is fixed in 1.4.17 and 1.5.0-beta.9.","state":0,"publishedAt":"2026-05-28T21:34:51.446+00:00","modifiedAt":"2026-05-29T19:05:38.845+00:00","affected":[{"ecosystem":"Vendor product","name":"better-auth","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"better-auth\",\n                    \"product\": \"better-auth\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.4.17\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 1.5.0-beta.1, < 1.5.0-beta.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-p6v2-xcpg-h6xw","https://github.com/better-auth/better-auth/pull/7470","https://github.com/better-auth/better-auth/pull/7509","https://github.com/better-auth/better-auth/commit/43e719bcc0c223c7079fa0c611a9cf7ea1188254","https://github.com/better-auth/better-auth/commit/57af0f7b910dcf7b1a5c0615d10b9bd56bb69bef"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-45364","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-45364","identifiers":["CVE-2026-45364"]},"retained":false,"historicalAffected":[]},{"revision":"3a079301ed164e0195770fa04acc235e","observedAt":"2026-11-24T00:29:32.199+00:00","statement":{"source":"euvd","id":"EUVD-2026-33073","aliases":["CVE-2026-45364","GHSA-p6v2-xcpg-h6xw"],"title":"Better Auth is an authentication and authorization library for TypeScript. Prior to 1.4.17 and 1.5.0-beta.9, Better Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in x-forwarded-for (or the configure…","description":"Better Auth is an authentication and authorization library for TypeScript. Prior to 1.4.17 and 1.5.0-beta.9, Better Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in x-forwarded-for (or the configured IP-bearing header). IPv6 clients controlling a typical /64 allocation could rotate through 2^64 distinct source addresses without exhausting the per-address counter, defeating rate limiting on /sign-in/email, /sign-up/email, /forget-password, and every other path the limiter protects. The same bug allowed a single client to vary the textual encoding of one IPv6 address (uppercase, compression, IPv4-mapped, hex-encoded IPv4-in-IPv6) and produce multiple distinct keys. This vulnerability is fixed in 1.4.17 and 1.5.0-beta.9.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"severity":null}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-p6v2-xcpg-h6xw","https://github.com/better-auth/better-auth/pull/7470","https://github.com/better-auth/better-auth/pull/7509","https://github.com/better-auth/better-auth/commit/43e719bcc0c223c7079fa0c611a9cf7ea1188254","https://github.com/better-auth/better-auth/commit/57af0f7b910dcf7b1a5c0615d10b9bd56bb69bef"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-33073","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 28, 2026, 9:34:51 PM","dateUpdated":"May 29, 2026, 7:05:38 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-33073","identifiers":["EUVD-2026-33073","CVE-2026-45364","GHSA-p6v2-xcpg-h6xw"]},"retained":false,"historicalAffected":[]},{"revision":"f8699ac46df24175bd8dc0514bade3a7","observedAt":"2026-10-25T10:17:33.838+00:00","statement":{"source":"nvd","id":"CVE-2026-45364","aliases":[],"title":"Better Auth is an authentication and authorization library for TypeScript. Prior to 1.4.17 and 1.5.0-beta.9, Better Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in x-forwarded-for (or the configure…","description":"Better Auth is an authentication and authorization library for TypeScript. Prior to 1.4.17 and 1.5.0-beta.9, Better Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in x-forwarded-for (or the configured IP-bearing header). IPv6 clients controlling a typical /64 allocation could rotate through 2^64 distinct source addresses without exhausting the per-address counter, defeating rate limiting on /sign-in/email, /sign-up/email, /forget-password, and every other path the limiter protects. The same bug allowed a single client to vary the textual encoding of one IPv6 address (uppercase, compression, IPv4-mapped, hex-encoded IPv4-in-IPv6) and produce multiple distinct keys. This vulnerability is fixed in 1.4.17 and 1.5.0-beta.9.","state":0,"publishedAt":"2026-05-28T22:17:00.633+00:00","modifiedAt":"2026-07-21T10:10:00.103+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/commit/43e719bcc0c223c7079fa0c611a9cf7ea1188254","https://github.com/better-auth/better-auth/commit/57af0f7b910dcf7b1a5c0615d10b9bd56bb69bef","https://github.com/better-auth/better-auth/pull/7470","https://github.com/better-auth/better-auth/pull/7509","https://github.com/better-auth/better-auth/security/advisories/GHSA-p6v2-xcpg-h6xw"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-45364","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-307"],"productCriteria":[],"sourceDates":{"published":"2026-05-28T22:17:00.633","lastModified":"2026-07-21T10:10:00.103"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-45364","identifiers":["CVE-2026-45364"]},"retained":false,"historicalAffected":[]},{"revision":"f261aa10edbc42bcb7f52a500dc0f169","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-p6v2-xcpg-h6xw","aliases":["CVE-2026-45364"],"title":"Better Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotation","description":"### Am I affected?\n\nUsers are affected if all of the following are true:\n\n- Their app uses `better-auth` at a version `< 1.4.17`, or at a v1.5 prerelease tagged `<= 1.5.0-beta.8`.\n- The apps authentication endpoints serve clients reachable over IPv6. Most managed hosts including Cloudflare, Vercel, Fly.io, AWS Application Load Balancer, and Google Cloud Load Balancing advertise IPv6 by default.\n- The app's rate-limit configuration is enabled (the production default) and relies on the leftmost `x-forwarded-for` value (the stock setup) or any other configured IP-bearing header.\n\nIf users are on `1.4.16` specifically, the `normalizeIP` helper exists in your version but the IPv6 prefix length defaults to `/128`. Stock config still permits prefix rotation because no prefix mask is applied. Either upgrade to `1.4.17` or set `advanced.ipAddress.ipv6Subnet: 64` in the config.\n\nIf applications do not use the rate limiter, or if the deployment serves only IPv4 clients, the prefix-rotation vector does not apply. The representation-aliasing vector still applies to IPv6 addresses delivered over IPv4 transport in some edge cases (an upstream proxy carrying an IPv4-mapped IPv6 source), but it is rare in practice.\n\nFix:\n\n1. Upgrade to `better-auth@1.4.17` or later. The current stable line `1.6.x` and the pre-release line `1.7.0-beta` both carry the fix.\n2. If applications cannot upgrade, see workarounds below.\n\n### Summary\n\nBetter Auth's HTTP rate limiter keyed each request by the exact textual IP address it received in `x-forwarded-for` (or the configured IP-bearing header). IPv6 clients controlling a typical `/64` allocation could rotate through 2^64 distinct source addresses without exhausting the per-address counter, defeating rate limiting on `/sign-in/email`, `/sign-up/email`, `/forget-password`, and every other path the limiter protects. The same bug allowed a single client to vary the textual encoding of one IPv6 address (uppercase, compression, IPv4-mapped, hex-encoded IPv4-in-IPv6) and produce multiple distinct keys.\n\n### Details\n\nThe pre-fix `getIp` function returned the leftmost `x-forwarded-for` value verbatim after a single validity check, and `onRequestRateLimit` constructed the rate-limit key by string concatenation of that value with the request path. Two facts of IPv6 made the key space larger than the population of clients:\n\n- ISPs and cloud providers assign prefixes, not addresses. RFC 6177 recommends `/56` for residential users; cloud providers commonly assign `/29` to `/48`. An attacker controlling a single `/64` therefore controls 2^64 source addresses without doing anything unusual.\n- IPv6 has multiple textual representations for the same address. RFC 5952 specifies a canonical form, but RFC 4291 §2.2 permits the older mixed forms, and `::ffff:0:0/96` IPv4-mapped addresses can be written as either dotted-decimal or hex-encoded.\n\nThe fix in `better-auth@1.4.17` introduces `normalizeIP` and applies it to every `getIp` result. Normalization expands compressed IPv6 forms, lowercases hex digits, collapses IPv4-mapped IPv6 to plain IPv4, and applies a default `/64` prefix mask. The rate-limit key construction now uses an explicit `|` separator to prevent key-construction collisions across address-and-path joins.\n\nThe `/64` default matches the smallest commonly-allocated IPv6 unit, so a single client cannot use prefix rotation to defeat rate limiting on stock config. Operators who serve clients on coarser allocations (`/56` for residential ISPs, larger for cloud) can configure `advanced.ipAddress.ipv6Subnet` accordingly.\n\n### Patches\n\nFixed in `better-auth@1.4.17` on the v1.4.x maintenance line and in `better-auth@1.5.0-beta.9` on the v1.5.x line. PR #7470 introduced the normalization primitive (`packages/core/src/utils/ip.ts`) and applied it to `getIp` and the rate-limit key. PR #7509 changed the IPv6 prefix-length default from `/128` to `/64` so that stock config closes the prefix-rotation vector without requiring users to opt in.\n\nAfter the patch, the rate limiter treats all IPv6 addresses within a `/64` allocation as a single client, all textual encodings of one IPv6 address as the same address, and all IPv4-mapped IPv6 addresses as their underlying IPv4 form.\n\n### Workarounds\n\nIf users cannot upgrade past `1.4.17`:\n\n- **On `>= 1.4.16`**: set `advanced.ipAddress.ipv6Subnet: 64` in the auth configuration. The `normalizeIP` helper is present at `1.4.16`; only the default is wrong. This restores the post-`1.4.17` behavior on stock config.\n- **On `< 1.4.16`**: shift the bypass mitigation upstream. Set the IPv6 prefix length on the app's CDN, WAF, or load balancer rate-limit policy to `/64` (or coarser per RFC 6177 if the app serves residential traffic). Cloudflare, Vercel Firewall, AWS WAF, and Google Cloud Armor all support per-prefix rate limiting.\n- **As a partial mitigation on any version**: tighten the `customRules` window for sign-in, sign-up, and password-reset endpoints. This narrows the abuse window but does not close it.\n\n### Impact\n\nThe bypass enables unbounded authentication attempts from a single IPv6-capable client. Direct consequences:\n\n- Credential-stuffing and brute-force on `/sign-in/email` are no longer rate-limited per client.\n- Account enumeration via response-shape differences becomes faster.\n- Password-reset and email-verification email fan-out can be amplified.\n\nThe bypass does not directly compromise any account. Successful exploitation still requires the attacker to guess a credential the password store accepts. The rating reflects the loss of one defense-in-depth layer rather than a direct compromise.\n\n### Credit\n\nReported by `@nexryai` on GitHub.\n\n### Resources\n\n- [CWE-307: Improper Restriction of Excessive Authentication Attempts](https://cwe.mitre.org/data/definitions/307.html)\n- [RFC 4291: IP Version 6 Addressing Architecture](https://datatracker.ietf.org/doc/html/rfc4291)\n- [RFC 5952: A Recommendation for IPv6 Address Text Representation](https://datatracker.ietf.org/doc/html/rfc5952)\n- [RFC 6177: IPv6 Address Assignment to End Sites](https://datatracker.ietf.org/doc/html/rfc6177)","state":0,"publishedAt":"2026-05-15T17:41:37+00:00","modifiedAt":"2026-06-09T10:30:12.7941118+00:00","affected":[{"ecosystem":"npm","name":"better-auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.4.17"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"better-auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.5.0-beta.1"},{"kind":"fixed","version":"1.5.0-beta.9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-p6v2-xcpg-h6xw","https://nvd.nist.gov/vuln/detail/CVE-2026-45364","https://github.com/better-auth/better-auth/pull/7470","https://github.com/better-auth/better-auth/pull/7509","https://github.com/better-auth/better-auth/commit/43e719bcc0c223c7079fa0c611a9cf7ea1188254","https://github.com/better-auth/better-auth/commit/57af0f7b910dcf7b1a5c0615d10b9bd56bb69bef","https://github.com/better-auth/better-auth"],"sourceUrl":"https://github.com/advisories/GHSA-p6v2-xcpg-h6xw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p6v2-xcpg-h6xw","identifiers":["GHSA-p6v2-xcpg-h6xw","CVE-2026-45364"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7050132+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7050135+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-2ae43d33679e7db56ab1b459a4a26f489723a98eec44cb48e7b9bc15fd8c4513","complete":true,"records":431119,"lastAttemptAt":"2026-11-24T12:25:34.0435863+00:00","lastSuccessAt":"2026-11-24T12:25:33.8929077+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.0435863+00:00","snapshotPublishedAt":"2026-11-24T11:31:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0041dd74f0f74a56936efb9a3230e9b6","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T12:35:26.4116826+00:00","lastSuccessAt":"2026-11-24T12:35:26.406+00:00","error":"326 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T12:35:26.406+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13515,"expectedIdentifiers":13982,"failedIdentifiers":326},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7058109+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7058137+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-af8ced7ee5fc4e4d8e650974b0ea48bf","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T12:26:14.9732632+00:00","lastSuccessAt":"2026-11-24T12:26:14.959+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:26:14.959+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13482,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T12:25:34.3950091+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.3950091+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T12:25:34.1932135+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.1932135+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T12:25:34.4958379+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.4958379+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T12:25:34.2909692+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.2909692+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}