Skip to content

Security Issue: Open Redirect allowed by default #355

@cbravo

Description

@cbravo

I just created and deployed a blank project using the instructions from the docs

pnpm create next-app
pnpm create sst
pnpm sst deploy --stage redirect-test 

with the settings below.
image
Without changing any of the code I deployed to https://d2layld3p8p37s.cloudfront.net/

https://d2layld3p8p37s.cloudfront.net//evil.com/ results in redirecting to evil.com which obviously would allow a malicious user to take advantage of my domain name to forward people to potentially dangerous urls.

note the trailing slash. It must have something to do with the trailing slash because without the trailing slash it works properly and 404s.

Improper Redirect: https://d2layld3p8p37s.cloudfront.net//evil.com/
Proper 404 behaviour https://d2layld3p8p37s.cloudfront.net//evil.com

this is using

"sst": "^2.40.1",
"next": "14.1.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions