Skip to content

GHSA-4x3x-869w-xx3m CVE-2026-48012

Shopware SSO referer trust leading to an arbitrary redirect target

Medium Packagist
Severity
4.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.27%
Chance of exploitation in the next 30 days. Higher than 19.95% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-601 URL Redirection to Untrusted Site ('Open Redirect')
Fix
Available
2 packages have a fixed version

Description

Description

This report describes an open redirect in Shopware's public SSO entry point at GET /api/oauth/sso/auth. When the endpoint is reached without the expected SSO session state, the application falls back to the request's Referer header and uses that value as the redirect destination. In the validated behavior, the server does not restrict that fallback target to same-origin URLs, does not require a relative path, and does not reject dangerous schemes such as javascript:. As a result, an unauthenticated request can turn this endpoint into a reusable redirect primitive whose destination is fully controlled by attacker-supplied request metadata.

The security problem is not limited to a harmless navigation mismatch. The endpoint sits under /api/oauth/, which gives the redirect a trustworthy application-controlled origin and makes it suitable for phishing chains, branded redirect abuse, and cases where client software automatically follows redirects issued by a trusted host. The attached evidence also shows that the response is not only an HTTP 302 with a user-controlled Location header. The HTML body contains a matching meta refresh tag and redirect link built from the same attacker-controlled value. In the validated proof, the endpoint redirects to https://attacker.example/poc when that URL is supplied through Referer, and it also reflects javascript:alert(1) into Location and the HTML redirect body without any scheme filtering. This report therefore stays conservative and claims an open redirect with arbitrary redirect targets, while noting that the lack of scheme restrictions makes the behavior materially worse than a same-scheme external redirect.

Steps To Reproduce

  1. Start a local Shopware instance that exposes the vulnerable endpoint at http://127.0.0.1:8000/api/oauth/sso/auth. No login is required for the proof. The attached Python PoC already targets that base URL and is configured to send direct requests without following redirects automatically.
  2. Run the attached PoC with python3 poc_sso_referer_open_redirect.py. The script sends three requests to GET /api/oauth/sso/auth and records the raw responses as evidence files. The first request omits the Referer header entirely. The second request supplies Referer: https://attacker.example/poc. The third request supplies Referer: javascript:alert(1).
  3. Inspect the first recorded response in evidence/sso_redirect_no_referer.raw.txt. In the validated run, the endpoint returns 401 with the message Referrer not found. Cannot redirect. This shows that the code path being exercised is the unauthenticated fallback behavior that depends on Referer when the expected SSO state is missing.
  4. Inspect evidence/sso_redirect_https_redirect.raw.txt. In the validated run, the endpoint returns 302 and sets Location: https://attacker.example/poc. The HTML body also contains a meta refresh tag and redirect link pointing to the same external URL. This demonstrates that the server accepts an attacker-controlled external target and emits it as a redirect destination.
  5. Inspect evidence/sso_redirect_javascript_redirect.raw.txt. In the validated run, the endpoint again returns 302, but this time the response sets Location: javascript:alert(1). The HTML body mirrors the same javascript: target in both the meta refresh tag and the anchor. This demonstrates that the fallback redirect does not even enforce an http or https scheme restriction before constructing the response.
  6. Compare the PoC summary in evidence/poc_sso_referer_open_redirect.output.txt with the raw responses. The validated run shows 401 when no Referer is present, 302 to https://attacker.example/poc when an external HTTPS URL is supplied, and 302 to javascript:alert(1) when a dangerous scheme is supplied. That behavior confirms the endpoint can be used as an open redirect with an arbitrary redirect target controlled through Referer.

Recommendations

The endpoint should stop using Referer as a fallback redirect target when the expected SSO state is missing. If the application cannot complete the SSO flow because the required session state does not exist, it should return a fixed error response or redirect only to a fixed internal page that is not influenced by request headers. Referer is not a trustworthy source of navigation intent and should not be treated as an authorization or routing signal for security-sensitive redirect logic.

If the product needs to preserve a return destination, that destination should be derived from a server-generated state value or validated against a strict allowlist. At minimum, the code should reject non-HTTP schemes, reject scheme-relative targets such as //host, and reject absolute URLs that are not same-origin with the current Shopware instance. A regression test should cover the exact cases proven here: no Referer, an external HTTPS Referer, and a javascript: Referer, with assertions that none of the attacker-controlled values can be emitted into Location or the HTML redirect body.

Impact

The demonstrated impact is that an unauthenticated attacker can cause a trusted Shopware endpoint to emit arbitrary redirect targets chosen through the request's Referer header. In the minimum case, that enables standard open redirect abuse for phishing, brand impersonation, and redirect chaining through a legitimate application origin. Because the redirect is served from /api/oauth/sso/auth, the resulting URL can look more trustworthy than a generic off-site redirect and may be more likely to be followed by users or client software that expects the endpoint to participate in an authentication flow.

The validated evidence also shows that the endpoint does not restrict the redirect target to ordinary web URLs. It reflects javascript:alert(1) directly into Location and into the HTML redirect page. This report keeps the claim conservative and classifies the issue as an open redirect with arbitrary redirect targets, but the acceptance of dangerous schemes makes the behavior more severe than a simple same-browser redirect to another HTTPS site and increases the risk of downstream abuse depending on client behavior.

Note on submission channel:

I initially attempted to submit this issue through Shopware’s official security reporting form. The form backend returned HTTP 400 for normal submissions, and when an attachment was included it explicitly rejected .md, .py, .zip files with the message File type not allowed. Because the official form was not functioning correctly for me, I am submitting this report privately through GitHub’s vulnerability reporting flow.

Affected versions

Packagist

PackageVulnerableFixed in
shopware/core
>= 6.7.3.0, < 6.7.10.1
6.7.10.1
shopware/platform
>= 6.7.3.0, < 6.7.10.1
6.7.10.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

shopware/core Packagist → 6.7.10.1

composer
composer require shopware/core:^6.7.10.1

shopware/platform Packagist → 6.7.10.1

composer
composer require shopware/platform:^6.7.10.1

Severity breakdown

CVSS 3.1 4.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

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

Weakness

CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.

How to prevent it
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. Use a list of approved URLs or domains to be used for redirection.
  • Architecture and Design: Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on the link. Be careful to avoid XSS problems (CWE-79) when generating the disclaimer page.
  • Architecture and Design: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to "/login.asp" and ID 2 could map to "http://www.example.com/". Features such as the ESAPI AccessReferenceMap [REF-45] provide this capability.
  • Architecture and Design: Ensure that no externally-supplied requests are honored by requiring that all redirect requests include a unique nonce generated by the application [REF-483]. Be sure that the nonce is not predictable (CWE-330).
  • Architecture and Design, Implementation: Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls. Many open redirect problems occur because the programmer assumed that certain inputs could not be modified, such as cookies and hidden form fields.
  • Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-gq96-5pfx-f4vc
Shopware: SSRF in Media External-Link Endpoint Bypasses IP Validation
Medium Also affects shopware/core
GHSA-xvhc-gm7j-mhmc
Shopware: Stored XSS via SVG file upload — no SVG sanitization
Medium Also affects shopware/core
GHSA-9v5m-39wh-5chq
Shopware: Unauthorized Payment Trigger for Foreign Orders via /store-api/handle-payment
Medium Also affects shopware/core
GHSA-f8q6-3g5w-jjr6
Shopware: Admin API ACL Bypass in Order State Transition Endpoints
Medium Also affects shopware/core
GHSA-7w52-7jvm-m9vw
Shopware: Timing-attack on admin panel allowing enumeration of administrator usernames
Low Also affects shopware/core
GHSA-v39m-97p8-gqg7
Shopware: Privilege escalation: non-admin user with user:create ACL can create admin accounts
Medium Also affects shopware/core
GHSA-8v9p-g828-v98f
Shopware: Admin Account Takeover via User Recovery Hash Exposure
Medium Also affects shopware/core
GHSA-gv8p-48fr-4fxg
Shopware: Privilege Escalation via Sync API Integration Admin Flag Bypass
Medium Also affects shopware/core
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor