Skip to content

chore(deps): update dependency next-auth to v4.24.5 [security]#32

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-next-auth-vulnerability
Open

chore(deps): update dependency next-auth to v4.24.5 [security]#32
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-next-auth-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Feb 26, 2024

This PR contains the following updates:

Package Change Age Confidence
next-auth (source) 4.23.24.24.5 age confidence

Possible user mocking that bypasses basic authentication

CVE-2023-48309 / GHSA-v64w-49xw-qq89

More information

Details

Impact

next-auth applications prior to version 4.24.5 that rely on the default Middleware authorization are affected.

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).

Note: Regardless of the vulnerability, the existence of a NextAuth.js session state can provide simple authentication, but not authorization in your applications. For role-based access control, you can check out our guide.

Patches

We patched the vulnerability in next-auth v4.24.5. To upgrade, run one of the following:

npm i next-auth@latest
yarn add next-auth@latest
pnpm add next-auth@latest
Workarounds

Upgrading to latest is the recommended way to fix this issue. However, using a custom authorization callback for Middleware, developers can manually do a basic authentication:

// middleware.ts
import { withAuth } from "next-auth/middleware"

export default withAuth(/*your middleware function*/, {
  // checking the existence of any property - besides `value` which might be a random string - on the `token` object is sufficient to prevent this vulnerability
  callbacks: { authorized: ({ token }) => !!token?.email }
})
References

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

nextauthjs/next-auth (next-auth)

v4.24.5

Compare Source

Bugfixes

  • differentiate between issued JWTs

v4.24.4

Compare Source

Bugfixes

  • allow Next.js 14 as peer dependency

v4.24.3

Compare Source

Bugfixes

  • css build error

v4.24.2

Compare Source

Bugfixes

  • css build error

v4.24.1

Compare Source

Bugfixes

  • css build error

v4.24.0

Compare Source

Features


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot requested a review from sullivanpj as a code owner February 26, 2024 04:58
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 2555180 to a0b2184 Compare January 25, 2025 11:53
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from a0b2184 to ac0cbe8 Compare January 31, 2025 23:09
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from ac0cbe8 to 8951040 Compare February 12, 2025 00:07
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 8951040 to 1ec5904 Compare March 4, 2025 00:11
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 1ec5904 to a9539ff Compare March 13, 2025 00:07
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from a9539ff to b8c7a7b Compare March 14, 2025 00:24
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review by ChatGPT

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from b8c7a7b to f3e8a5e Compare March 19, 2025 04:12
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from f3e8a5e to c3d36a3 Compare April 4, 2025 03:41
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from c3d36a3 to ae4adca Compare April 10, 2025 00:16
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sonarqubecloud
Copy link
Copy Markdown

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from ae4adca to b8a1d85 Compare April 15, 2026 16:02
@renovate renovate Bot requested a review from a team April 15, 2026 16:02
@renovate renovate Bot changed the title fix(deps): update dependency next-auth to v4.24.5 [security] chore(deps): update dependency next-auth to v4.24.5 [security] Apr 15, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from b8a1d85 to 5c09d61 Compare April 30, 2026 02:16
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 5c09d61 to 4c071a8 Compare May 13, 2026 07:46
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 4c071a8 to e468fee Compare May 22, 2026 08:12
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from e468fee to 3f91c35 Compare May 30, 2026 11:55
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@renovate renovate Bot force-pushed the renovate/npm-next-auth-vulnerability branch from 3f91c35 to b994288 Compare June 4, 2026 20:13
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvscode-jsonrpc@​8.2.0100100929570
Addedhusky@​8.0.31001007980100
Addedtype-detect@​4.0.810010010080100
Addeddecimal.js@​10.4.310010010081100
Addedshell-quote@​1.8.11008510088100
Addedprettier@​2.8.8991009893100

View full report

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
Critical CVE: npm form-data uses unsafe random function in form-data for choosing boundary

CVE: GHSA-fjxv-7rqg-78g4 form-data uses unsafe random function in form-data for choosing boundary (CRITICAL)

Affected versions: < 2.5.4; >= 3.0.0 < 3.0.4; >= 4.0.0 < 4.0.4

Patched version: 2.5.4

From: pnpm-lock.yamlnpm/form-data@2.3.3

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/form-data@2.3.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Critical
Critical CVE: npm form-data uses unsafe random function in form-data for choosing boundary

CVE: GHSA-fjxv-7rqg-78g4 form-data uses unsafe random function in form-data for choosing boundary (CRITICAL)

Affected versions: < 2.5.4; >= 3.0.0 < 3.0.4; >= 4.0.0 < 4.0.4

Patched version: 3.0.4

From: pnpm-lock.yamlnpm/form-data@3.0.1

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/form-data@3.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: pnpm-lock.yamlnpm/entities@4.5.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@4.5.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants