Skip to content

Open Redirect#16

Open
tmalbos wants to merge 1 commit intomasterfrom
Plexicus-AI-Remediation-7d42818a-8b00-427d-910b-bb5f7fe26c2e
Open

Open Redirect#16
tmalbos wants to merge 1 commit intomasterfrom
Plexicus-AI-Remediation-7d42818a-8b00-427d-910b-bb5f7fe26c2e

Conversation

@tmalbos
Copy link

@tmalbos tmalbos commented Mar 16, 2025

The weakness was addressed by replacing the previous allowlist check with a more secure validation process. Instead of using a single call to security.isRedirectAllowed(toUrl), the code now explicitly iterates over a predefined allowlist (security.redirectAllowlist) and checks if the user provided URL starts with any allowed URL through the helper function utils.startsWith. This ensures that only URLs with approved prefixes are permitted, effectively preventing open redirect vulnerabilities by blocking untrusted or malicious URLs. As an additional consideration, it's important to review and carefully configure the allowlist to include only secure and necessary domains, and ensure that utils.startsWith correctly handles edge cases, such as URL encoding and trailing slashes.

Created by: plexicus@plexicus.com

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.

2 participants