Intel

AIKIDO-2025-10186

@payloadcms/next is vulnerable to Open Redirect

Open Redirect Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.

55

Medium Risk

This Affects:

JS@payloadcms/next
3.0.0 - 3.30.0
Fixed in 3.31.0
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to Open Redirect due to insufficient validation of redirect paths in the login flow. An attacker can exploit this to redirect users to malicious websites. This issue is addressed by introducing the getSafeRedirect utility, which ensures redirect paths start with a single /, blocks protocol-relative URLs (e.g., //evil.com), prevents JavaScript scheme execution (e.g., /javascript:alert(1)), and blocks full URL redirects such as /http: or /https:.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@payloadcms/next is vulnerable to Open Redirect in versions 3.0.0 - 3.30.0.

How to fix this

Upgrade the @payloadcms/next library to the patch version.