Skip to main content
Menu
Advisories

Route loader guard bypass in production: q-loader requests skip blocking loaders that sort after the target export name

GHSA-9824-6P99-RWWMPublished Updated GitHub

Description

Authorization bypass in Qwik Router loader requests

Summary

Qwik Router can skip a blocking loader used as an authorization guard when handling a direct loader-data request in a production build. This may allow an unauthenticated client to retrieve protected data even when the corresponding page request correctly redirects to authentication.

The issue results from relying on module export ordering, which differs between development and production builds.

Affected configuration

Reported in @qwik.dev/router 2.0.0-rc.3, in production applications that rely on a blocking route loader to authorize access to other loaders without independent authorization checks.

Impact

Unauthenticated clients may retrieve protected loader data without passing the route’s authorization guard. The bypass depends on the relative ordering of the guard and protected loader exports and may remain unnoticed during development.

Remediation

Ensure authorization guards run consistently before protected loader requests, independently of module export ordering.

Applications can mitigate the issue by enforcing authorization inside each loader that returns protected data.

Weakness: CWE-862 — Missing Authorization.

Affected versions

References

GitHub · QwikDev/qwik