CVE-2022-29214
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedNextAuth.js (next-auth) is am open source authentication solution for Next.js applications. Prior to versions 3.29.3 and 4.3.3, an open redirect vulnerability is present when the developer is implementing an OAuth 1 provider. Versions 3.29.3 and 4.3.3 contain a patch for this issue. The maintainers recommend adding a certain configuration to one's `callbacks` option as a workaround for those unable to upgrade.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceNextAuth.js versions prior to 3.29.3 and 4.3.3 contain an open redirect vulnerability when implementing an OAuth 1 provider. The vulnerability allows attackers to craft malicious URLs that can redirect authenticated users to attacker-controlled sites due to insufficient validation of redirect parameters in the OAuth 1 authentication flow.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 3.29.3>= 4.0.0, < 4.3.3CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed NextAuth.js versionRun 'npm list next-auth' or 'npm list @next-auth/core' in your project directory to see the installed version. Alternatively, check your package.json file for the next-auth or @next-auth/core dependency version.Affected if The installed version is below 3.29.3 or is 4.0.0 through 4.3.2 (inclusive).
-
Identify OAuth 1 provider configurationExamine your NextAuth.js configuration file (typically in pages/api/auth/[...nextauth].js, pages/api/auth/[...nextauth].ts, or app/api/auth/[...nextauth]/route.js/ts) and look for any provider objects that include 'requestTokenURL', 'accessTokenURL', and 'authorizationURL' properties, which indicate OAuth 1.0 usage.Affected if An OAuth 1.0 provider is configured with the three OAuth 1 specific URLs mentioned above.
-
Inspect redirect callback validationLook at the 'callbacks' configuration in your NextAuth.js options for a 'redirect' callback that validates the URL parameter before allowing redirection. Check if it contains logic to verify the destination URL (e.g., checking if the URL starts with a trusted domain).Affected if No 'redirect' callback is defined, or the existing redirect callback does not validate that the url parameter points to a trusted destination.
You are affected if your NextAuth.js version is in the vulnerable range AND you use an OAuth 1 provider AND you lack proper URL validation in a redirect callback.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.29.34.3.3
Upgrade to NextAuth.js version 3.29.3 or 4.3.3, or implement proper redirect URL validation within the callbacks configuration option to verify the destination URL before allowing redirection.
NextAuth.js v3.29.3 or v4.3.3 (depending on your major version)
- If using NextAuth.js v3.x, upgrade to version 3.29.3 or later by running: npm install next-auth@^3.29.3
- If using NextAuth.js v4.x, upgrade to version 4.3.3 or later by running: npm install next-auth@^4.3.3
- After upgrading, verify your OAuth 1 provider configuration works correctly
- Alternatively, if unable to upgrade, add a redirect URL validation callback: callbacks: { signin: async (context) => { if (context.proxyUrl && !context.proxyUrl.startsWith('https://your-domain.com/')) { return false; } return true; } }
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-29214 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-29214 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data