CVE-2023-48309

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-48309
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-48309.json
Aliases
Published
2023-11-20T19:15:09Z
Modified
2023-11-29T10:20:53.390422Z
Details

NextAuth.js provides authentication for Next.js. next-auth applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the next-auth.session-token cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). next-auth v4.24.5 contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication.

References

Affected packages

Git / github.com/nextauthjs/next-auth

Affected ranges

Type
GIT
Repo
https://github.com/nextauthjs/next-auth
Events
Introduced
0The exact introduced commit is unknown
Fixed

Affected versions

@auth/core@v0.*

@auth/core@v0.1.0
@auth/core@v0.1.1

@auth/sveltekit@v0.*

@auth/sveltekit@v0.1.0
@auth/sveltekit@v0.1.1

@next-auth/dgraph-adapter@v1.*

@next-auth/dgraph-adapter@v1.0.4

@next-auth/dynamodb-adapter@v1.*

@next-auth/dynamodb-adapter@v1.0.4
@next-auth/dynamodb-adapter@v1.0.5

@next-auth/fauna-adapter@v1.*

@next-auth/fauna-adapter@v1.0.4

@next-auth/firebase-adapter@v1.*

@next-auth/firebase-adapter@v1.0.0
@next-auth/firebase-adapter@v1.0.1
@next-auth/firebase-adapter@v1.0.2
@next-auth/firebase-adapter@v1.0.3

@next-auth/mikro-orm-adapter@v2.*

@next-auth/mikro-orm-adapter@v2.0.0

@next-auth/mikro-orm-adapter@v3.*

@next-auth/mikro-orm-adapter@v3.0.0
@next-auth/mikro-orm-adapter@v3.0.1

@next-auth/mongodb-adapter@v1.*

@next-auth/mongodb-adapter@v1.0.2
@next-auth/mongodb-adapter@v1.0.4
@next-auth/mongodb-adapter@v1.1.0
@next-auth/mongodb-adapter@v1.1.1

@next-auth/neo4j-adapter@v1.*

@next-auth/neo4j-adapter@v1.0.4
@next-auth/neo4j-adapter@v1.0.5

@next-auth/pouchdb-adapter@v.*

@next-auth/pouchdb-adapter@v.0.1.5

@next-auth/pouchdb-adapter@v0.*

@next-auth/pouchdb-adapter@v0.1.4

@next-auth/prisma-adapter@1.*

@next-auth/prisma-adapter@1.0.4

@next-auth/prisma-adapter@v1.*

@next-auth/prisma-adapter@v1.0.2
@next-auth/prisma-adapter@v1.0.4
@next-auth/prisma-adapter@v1.0.5

@next-auth/sequelize-adapter@v1.*

@next-auth/sequelize-adapter@v1.0.5
@next-auth/sequelize-adapter@v1.0.6

@next-auth/supabase-adapter@v0.*

@next-auth/supabase-adapter@v0.2.0

@next-auth/typeorm-legacy-adapter@v1.*

@next-auth/typeorm-legacy-adapter@v1.0.2

@next-auth/typeorm-legacy-adapter@v2.*

@next-auth/typeorm-legacy-adapter@v2.0.0
@next-auth/typeorm-legacy-adapter@v2.0.1

@next-auth/upstash-redis-adapter@v3.*

@next-auth/upstash-redis-adapter@v3.0.1
@next-auth/upstash-redis-adapter@v3.0.2
@next-auth/upstash-redis-adapter@v3.0.3

@next-auth/xata-adapter@v0.*

@next-auth/xata-adapter@v0.2.0

next-auth@4.*

next-auth@4.18.10
next-auth@4.18.8
next-auth@4.18.9
next-auth@4.19.0
next-auth@4.19.1
next-auth@4.19.2
next-auth@4.20.0
next-auth@4.20.1
next-auth@4.21.0
next-auth@4.21.1
next-auth@4.22.2
next-auth@4.22.3
next-auth@4.22.4
next-auth@4.22.5
next-auth@4.23.0
next-auth@4.23.1
next-auth@4.23.2
next-auth@4.24.0
next-auth@4.24.1
next-auth@4.24.2
next-auth@4.24.3
next-auth@4.24.4

next-auth@v.*

next-auth@v.4.15.2

next-auth@v4.*

next-auth@v4.10.0
next-auth@v4.10.1
next-auth@v4.10.2
next-auth@v4.10.3
next-auth@v4.11.0
next-auth@v4.12.0
next-auth@v4.12.1
next-auth@v4.12.2
next-auth@v4.13.0
next-auth@v4.14.0
next-auth@v4.15.0
next-auth@v4.15.1
next-auth@v4.16.0
next-auth@v4.16.1
next-auth@v4.16.2
next-auth@v4.16.3
next-auth@v4.16.4
next-auth@v4.17.0
next-auth@v4.18.0
next-auth@v4.18.1
next-auth@v4.18.2
next-auth@v4.18.3
next-auth@v4.18.4
next-auth@v4.18.5
next-auth@v4.18.6
next-auth@v4.18.7
next-auth@v4.3.0
next-auth@v4.3.1
next-auth@v4.3.3
next-auth@v4.3.4
next-auth@v4.5.0
next-auth@v4.6.1
next-auth@v4.8.0
next-auth@v4.9.0

v1.*

v1.13.0

v2.*

v2.0
v2.0.1
v2.1.0
v2.2.0

v3.*

v3.0.0
v3.0.1
v3.1.0
v3.10.0
v3.10.1
v3.11.0
v3.11.1
v3.11.2
v3.12.0
v3.13.0
v3.13.1
v3.13.2
v3.13.3
v3.14.0
v3.14.1
v3.14.2
v3.14.3
v3.14.4
v3.14.5
v3.14.6
v3.14.7
v3.14.8
v3.15.0
v3.15.1
v3.15.10
v3.15.11
v3.15.12
v3.15.13
v3.15.2
v3.15.3
v3.15.4
v3.15.5
v3.15.6
v3.15.7
v3.15.8
v3.15.9
v3.16.0
v3.16.1
v3.17.0
v3.17.1
v3.17.2
v3.18.0
v3.18.1
v3.18.2
v3.19.0
v3.19.1
v3.19.2
v3.19.3
v3.19.4
v3.19.5
v3.19.6
v3.19.7
v3.19.8
v3.2.0
v3.2.1
v3.20.0
v3.20.1
v3.21.0
v3.21.1
v3.22.0
v3.23.0
v3.23.1
v3.23.2
v3.23.3
v3.24.0
v3.24.1
v3.25.0
v3.26.0
v3.26.1
v3.27.0
v3.27.1
v3.27.2
v3.27.3
v3.28.0
v3.29.0
v3.3.0
v3.3.1
v3.4.0
v3.4.1
v3.4.2
v3.5.0
v3.5.1
v3.6.0
v3.6.1
v3.7.0
v3.7.1
v3.8.0
v3.9.0

v4.*

v4.0.0-beta.1
v4.0.0-beta.2
v4.0.0-beta.3
v4.0.0-beta.4
v4.0.0-beta.5
v4.0.0-beta.6
v4.0.0-beta.7
v4.0.0-next.1
v4.0.0-next.10
v4.0.0-next.11
v4.0.0-next.12
v4.0.0-next.13
v4.0.0-next.14
v4.0.0-next.15
v4.0.0-next.16
v4.0.0-next.17
v4.0.0-next.18
v4.0.0-next.19
v4.0.0-next.2
v4.0.0-next.20
v4.0.0-next.21
v4.0.0-next.22
v4.0.0-next.23
v4.0.0-next.24
v4.0.0-next.25
v4.0.0-next.26
v4.0.0-next.3
v4.0.0-next.4
v4.0.0-next.5
v4.0.0-next.6
v4.0.0-next.7
v4.0.0-next.8
v4.0.0-next.9
v4.0.1
v4.0.2
v4.0.3
v4.0.4
v4.0.5
v4.0.6
v4.1.0
v4.1.1
v4.1.2
v4.2.0
v4.2.1