DOM Cross Site Scripting and openredirect in saleor/react-storefront

Valid

Reported on

May 29th 2023


Vulnerable Endpoint:

https://demo.saleor.io/default-channel/en-US/account/login/?next=javascript:alert(1)

Description:

  1. Hello team, Recently i found that, on saleor React storefront dashboard there is a DOM XSS and open-redirect vulnerability

Steps to reproduce XSS:

  1. Go to the above mentioned link and login with valid creds, and the XSS payload will trigger POC:

Steps to reproduce open redirect:

  1. Click on the link and login with valid url, it will be redirected to evil.com https://demo.saleor.io/default-channel/en-US/account/login/?next=http://evil.com

Impact

  1. XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. The most severe XSS attacks involve disclosure of the user's session cookie, allowing an attacker to hijack the user's session and take over the account.can execute client side scrips etc
We are processing your report and will contact the saleor/react-storefront team within 24 hours. 4 months ago
Mikail
4 months ago

Maintainer


Hi Akshay,

Thank you for your report, we confirmed this is a problem and forwarded the issue to the appropriate team.

I am suggesting changing the CVSS metric from UI:N to UI:R as the user needs to for example be tricked into clicking a malicious link.

While reviewing your report we also found that on top of CWE-79, the parameter ?next=... is vulnerable to open-redirects (CWE-601) by for example passing https:google.com or https:\\google.com. CVSS rating: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N (medium 4.3).

For both CWE-79 and CWE-601, the issue was improperly fixed in January at https://github.com/saleor/react-storefront/commit/591a17ee2ccfaf52658b76909cf3abd80e9ad50c.

We will be updating you on the details soon.

Akshay Ravi modified the report
4 months ago
Akshay Ravi
4 months ago

Researcher


Hello @maintainer @Mikail

I have updated the report and also changed the CVSS UI:N to UI:R

I forgot to say that, Seven months ago, I submitted this issue through Bugcrowd. At that time, there was a program hosting an open-source repository where they had forked the Saleor dashboard. I mistakenly believed it was within the program's scope, so I reported this same issue via Bugcrowd. However, they advised me to report it directly to the Saleor team. Regrettably, I forgot to follow up with the Saleor team at that time.

We have contacted a member of the saleor/react-storefront team and are waiting to hear back 4 months ago
Mikail validated this vulnerability 4 months ago
Akshay Ravi has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
Akshay Ravi
4 months ago

Researcher


@Mikail, could you pls assign a CVE for this issue? Thanks

Mikail
4 months ago

Maintainer


@admin I see you are a CNA, could it be possible for you to assign two CVEs for this project?

CVE #1: CWE-79, XSS vulnerability in login page redirect URL - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L

CVE #2: CWE-601, Open redirect vulnerability in login page redirect URL - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Note that this project doesn't have any version number and the team responsible for this project mentioned they do not wish to start versioning as they are planning on archiving the project soon. Hopefully it would still be possible to issue CVE numbers.

We will be inviting users to upgrade to a specific commit once the vulnerability is disclosed.

Akshay Ravi
4 months ago

Researcher


@admin As per maintainers request i have created another report, the older report was this one https://huntr.dev/bounties/04c4d4ef-3208-48bd-8e86-e35c60335905 which have a bounty amount of $75, can i get the same for this migrated report also?

Also please assign a CVE for this report, thanks

Mikail
4 months ago

Maintainer


The fix is ready on our end. @admin, any info and time estimation about the CVEs? The details about the requested CVEs are available in our previous @admin mention.

Pavlos
3 months ago

Admin


On it :)

Ben Harvie
3 months ago

Admin


Hi Mikail, if you could please mark as fixed with the commit SHA as the fix version, this will assign a CVE to the report. We can only assign one CVE per report but I will hapilly assign and publish a second one as you requested, it just won't be visible on this report page. Thanks:)

Akshay Ravi
3 months ago

Researcher


@admin

As per maintainers request i have created another report, the older report was this one https://huntr.dev/bounties/04c4d4ef-3208-48bd-8e86-e35c60335905 which have a bounty amount of $75, can i get the same for this migrated report also?

Ben Harvie
3 months ago

Admin


Hey Akshay,

The previous repository was sponsored but the corrected repository is not sponsored, so we will be unable to award a bounty in this case. If you truly find a vulnerability in saleor/saleor we can reward a bounty:)

Akshay Ravi
3 months ago

Researcher


@maintainer @Mikail,

please mark as fixed with the commit SHA

Mikail
3 months ago

Maintainer


Just published the advisories:

  • https://github.com/saleor/react-storefront/security/advisories/GHSA-q3fv-6cg3-pm72
  • https://github.com/saleor/react-storefront/security/advisories/GHSA-wq85-q492-8vxv

Patch is available at https://github.com/saleor/react-storefront/commit/c29aab226f07ca980cc19787dcef101e11b83ef7.

Mikail marked this as fixed in c29aab226f07ca980cc19787dcef101e11b83ef7 with commit c29aab 3 months ago
The fix bounty has been dropped
This vulnerability has been assigned a CVE
Mikail published this vulnerability 3 months ago
to join this conversation