Skip to content

Open Redirect in Next.js

Moderate severity GitHub Reviewed Published Aug 11, 2021 in vercel/next.js • Updated Feb 1, 2023

Package

npm next (npm)

Affected versions

>= 0.9.9, < 11.1.0

Patched versions

11.1.0

Description

Next.js is an open source website development framework to be used with the React library. In affected versions specially encoded paths could be used when pages/_error.js was statically generated, allowing an open redirect to occur to an external site. In general, this redirect does not directly harm users although it can allow for phishing attacks by redirecting to an attacker's domain from a trusted domain.

Impact

  • Affected: Users of Next.js between 10.0.5 and 10.2.0
  • Affected: Users of Next.js between 11.0.0 and 11.0.1 using pages/_error.js without getInitialProps
  • Affected: Users of Next.js between 11.0.0 and 11.0.1 using pages/_error.js and next export
  • Not affected: Deployments on Vercel (vercel.com) are not affected
  • Not affected: Deployments with pages/404.js
  • Note that versions prior to 0.9.9 package next npm package hosted a different utility (0.4.1 being the latest version of that codebase), and this advisory does not apply to those versions.

We recommend upgrading to the latest version of Next.js to improve the overall security of your application.

Patches

https://github.com/vercel/next.js/releases/tag/v11.1.0

References

@timneutkens timneutkens published to vercel/next.js Aug 11, 2021
Published by the National Vulnerability Database Aug 12, 2021
Reviewed Aug 12, 2021
Published to the GitHub Advisory Database Aug 12, 2021
Last updated Feb 1, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N

EPSS score

0.062%
(29th percentile)

Weaknesses

CVE ID

CVE-2021-37699

GHSA ID

GHSA-vxf5-wxwp-m7g9

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.