Summary
Quarkus HTTP path-based authorization can be bypassed when attackers craft URLs with encoded semicolons, slashes, or backslashes that are interpreted differently by the routing and security layers.
Under certain configurations, this mismatch allows unauthorized access to static resources or endpoints that should be protected by path-based policies.
Affected context
The issue appears in Quarkus applications that rely on path-based authorization rules (for example, @RolesAllowed combined with HTTP path patterns or security constraints) to guard endpoints and static resources.
It is most relevant when:
- URL normalization or canonicalization is not consistently applied across routing, static resource handling, and security filters.
- Static resources or endpoints are considered protected solely based on their apparent path.
- Encoded characters such as
%3B,%2F, or%5Care accepted in URLs and decoded at different stages of request processing.
Exploit preconditions
- Attack surface: Public or internal HTTP endpoints of a Quarkus application, including static resource handlers.
- Required access: Ability to send crafted HTTP requests (no prior authentication is strictly required if public endpoints exist).
- Trigger point: Requests that include encoded semicolons (
%3B) to smuggle matrix parameters, or encoded slashes/backslashes (%2F,%5C) to alter the perceived path. - Why exploitation is possible: The framework's security layer and the HTTP routing/static resource layer interpret or normalize URL-encoded characters differently, causing path-based authorization checks to be evaluated against a different effective path than the one ultimately used to serve content.
Why this happens
The root cause is a URL normalization mismatch between the path used for authorization decisions and the path used for actual resource resolution.
Encoded special characters like semicolons, slashes, and backslashes are decoded or interpreted at different stages, allowing attackers to:
- Inject or obscure matrix parameters using encoded semicolons so they bypass policy checks.
- Traverse or reshape paths using encoded slashes/backslashes so that sensitive static resources appear to reside on unprotected paths.
Conceptually, this maps to:
- CWE-287 (Improper Authentication) in the sense that the system fails to reliably ensure only properly authenticated/authorized identities access protected paths.
- CWE-863 (Incorrect Authorization) because authorization decisions are based on an incorrect or incomplete representation of the requested resource path.
Potential impact
- Unauthorized access to static files that are assumed to be protected by path-based rules.
- Bypassing authentication or role-based checks on certain endpoints.
- Exposure of configuration files, assets, or other sensitive content placed behind path restrictions.
- Facilitation of further attacks (information disclosure, session hijacking helpers, recon) by leaking internal implementation details.
General mitigation guidance
Mitigation generally focuses on ensuring consistent URL normalization and avoiding sole reliance on raw path strings for authorization:
- Normalize and canonicalize request paths in a single, central place before any authorization logic runs.
- Apply security checks to the canonical path used for final routing and static resource resolution, not to the raw request line.
- Avoid designing security rules that depend on subtle path syntax features such as matrix parameters or encoded delimiters.
- Prefer declarative, context-aware authorization (e.g., route-level or handler-level annotations) that ties permissions directly to code or resource handlers rather than simple string path prefixes.
- Restrict or reject suspiciously encoded paths and disallow unnecessary characters where feasible.
- Place sensitive static content outside of web-accessible directories, or gate it behind explicit controller logic and authorization checks rather than directory-based controls.
How teams detect issues like this
To detect similar vulnerabilities:
- Use static analysis or code review to identify patterns where:
- Authorization decisions depend on raw
request.getPath()or similar values without canonicalization. - Access control relies heavily on string-based path prefix or suffix checks.
- Matrix parameters or complex URL encodings are accepted without clear security review.
- Add integration tests and security tests that:
- Exercise endpoints and static resources with encoded semicolons, slashes, and backslashes.
- Verify that protected endpoints remain inaccessible when using alternative encodings of the same path.
- Configure automated security scanning or dynamic application security testing (DAST) tools to probe URL parsing edge cases and path traversal via encoded characters.
- Implement centralized logging for rejected requests and unusual path encodings, then monitor for patterns suggesting probing or bypass attempts.

