Packages / @builder.io/qwik-city / Security
Qwik City has a CSRF Protection Bypass via Content-Type Header Validation
Affected releases · @builder.io/qwik-city
- 1.x1.0.0 – 1.18.0Fixed in 1.19.0
- 0.107.x and older0.0.1 – 0.107.0No fix, no longer updated
On 1.x, the newest line:
npm install @builder.io/qwik-city@1.19.0Every release on a timeline
Affected
1.0.0 – 1.18.0
69 releases
Fixed
1.19.0 – 1.20.4
8 releases, latest
Affected
0.0.1 – 0.107.0
91 releases
What happens
Summary
Qwik City’s server-side request handler inconsistently interprets HTTP request headers, which can be abused by a remote attacker to circumvent form submission CSRF protections using specially crafted or multi-valued Content-Type headers.
Impact
A vulnerability in checkCSRF lets an attacker bypass Origin-based CSRF checks by using malformed or multi-valued Content-Type headers. Exploitation requires the CORS preflight to succeed (so it’s blocked if preflight is denied) and is possible when the application accepts cross-origin requests or via non-browser clients. Impact varies with server CORS and cookie policies and may enable unauthorized state changes.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.