{"id":"GHSA-fr8f-rwjx-f32v","summary":"quarkus-openapi-generator has overly broad path-parameter matching that sends authentication headers to unintended operations","details":"### Summary\n\nThe 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.\n\n### Details\n\nThe 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 `/`.\n\nAs 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.\n\nThis 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.\n\n### PoC\n\n```bash\nmkdir -p /tmp/qoag-poc/src/main/java/org/acme\nmkdir -p /tmp/qoag-poc/src/main/resources\nmkdir -p /tmp/qoag-poc/src/main/openapi\n\ncat \u003e /tmp/qoag-poc/pom.xml \u003c\u003c'EOF'\n\u003cproject xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\"\u003e\n  \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e\n  \u003cgroupId\u003eorg.acme\u003c/groupId\u003e\n  \u003cartifactId\u003eqoag-poc\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\n  \u003cproperties\u003e\n    \u003cproject.build.sourceEncoding\u003eUTF-8\u003c/project.build.sourceEncoding\u003e\n    \u003cmaven.compiler.release\u003e17\u003c/maven.compiler.release\u003e\n    \u003cquarkus.platform.group-id\u003eio.quarkus\u003c/quarkus.platform.group-id\u003e\n    \u003cquarkus.platform.artifact-id\u003equarkus-bom\u003c/quarkus.platform.artifact-id\u003e\n    \u003cquarkus.platform.version\u003e3.34.3\u003c/quarkus.platform.version\u003e\n    \u003cqoag.version\u003e2.16.0\u003c/qoag.version\u003e\n  \u003c/properties\u003e\n\n  \u003cdependencyManagement\u003e\n    \u003cdependencies\u003e\n      \u003cdependency\u003e\n        \u003cgroupId\u003e${quarkus.platform.group-id}\u003c/groupId\u003e\n        \u003cartifactId\u003e${quarkus.platform.artifact-id}\u003c/artifactId\u003e\n        \u003cversion\u003e${quarkus.platform.version}\u003c/version\u003e\n        \u003ctype\u003epom\u003c/type\u003e\n        \u003cscope\u003eimport\u003c/scope\u003e\n      \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n  \u003c/dependencyManagement\u003e\n\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.quarkiverse.openapi.generator\u003c/groupId\u003e\n      \u003cartifactId\u003equarkus-openapi-generator\u003c/artifactId\u003e\n      \u003cversion\u003e${qoag.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.quarkus\u003c/groupId\u003e\n      \u003cartifactId\u003equarkus-rest\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.quarkus\u003c/groupId\u003e\n      \u003cartifactId\u003equarkus-rest-client-jackson\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\n  \u003cbuild\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003eio.quarkus\u003c/groupId\u003e\n        \u003cartifactId\u003equarkus-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e${quarkus.platform.version}\u003c/version\u003e\n        \u003cextensions\u003etrue\u003c/extensions\u003e\n        \u003cexecutions\u003e\n          \u003cexecution\u003e\n            \u003cgoals\u003e\n              \u003cgoal\u003ebuild\u003c/goal\u003e\n              \u003cgoal\u003egenerate-code\u003c/goal\u003e\n              \u003cgoal\u003egenerate-code-tests\u003c/goal\u003e\n            \u003c/goals\u003e\n          \u003c/execution\u003e\n        \u003c/executions\u003e\n      \u003c/plugin\u003e\n      \u003cplugin\u003e\n        \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e3.14.0\u003c/version\u003e\n        \u003cconfiguration\u003e\n          \u003cparameters\u003etrue\u003c/parameters\u003e\n        \u003c/configuration\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n\u003c/project\u003e\nEOF\n\ncat \u003e /tmp/qoag-poc/src/main/openapi/repro.yaml \u003c\u003c'EOF'\nopenapi: 3.0.3\ninfo:\n  title: repro\n  version: 1.0.0\n\npaths:\n  /repos/{ref}:\n    get:\n      operationId: getRef\n      parameters:\n        - in: path\n          name: ref\n          required: true\n          schema:\n            type: string\n      security:\n        - bearerAuth: []\n      responses:\n        \"200\":\n          description: ok\n          content:\n            text/plain:\n              schema:\n                type: string\n\n  /repos/{owner}/{repo}:\n    get:\n      operationId: getOwnerRepo\n      parameters:\n        - in: path\n          name: owner\n          required: true\n          schema:\n            type: string\n        - in: path\n          name: repo\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: ok\n          content:\n            text/plain:\n              schema:\n                type: string\n\ncomponents:\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\nEOF\n\ncat \u003e /tmp/qoag-poc/src/main/resources/application.properties \u003c\u003c'EOF'\nquarkus.http.port=8081\nquarkus.openapi-generator.codegen.default-security-scheme=bearerAuth\nquarkus.openapi-generator.codegen.spec.repro_yaml.base-package=org.acme.repro\nquarkus.rest-client.repro_yaml.url=http://127.0.0.1:18080\nquarkus.openapi-generator.repro_yaml.auth.bearerAuth.bearer-token=SECRET\nEOF\n\ncat \u003e /tmp/qoag-poc/src/main/java/org/acme/TriggerResource.java \u003c\u003c'EOF'\npackage org.acme;\n\nimport jakarta.ws.rs.GET;\nimport jakarta.ws.rs.Path;\nimport jakarta.ws.rs.Produces;\nimport jakarta.ws.rs.core.MediaType;\nimport org.eclipse.microprofile.rest.client.inject.RestClient;\n\n@Path(\"/trigger\")\npublic class TriggerResource {\n    @RestClient\n    org.acme.repro.api.DefaultApi api;\n\n    @GET\n    @Produces(MediaType.TEXT_PLAIN)\n    public String trigger() {\n        api.getOwnerRepo(\"foo\", \"bar\");\n        return \"done\";\n    }\n}\nEOF\n\npython - \u003c\u003c'PY' &\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\nclass H(BaseHTTPRequestHandler):\n    def do_GET(self):\n        print(\"PATH=\" + self.path, flush=True)\n        print(\"AUTH=\" + str(self.headers.get(\"Authorization\")), flush=True)\n        self.send_response(200)\n        self.end_headers()\n        self.wfile.write(b\"ok\")\n    def log_message(self, fmt, *args):\n        pass\nHTTPServer((\"127.0.0.1\", 18080), H).serve_forever()\nPY\n\ncd /tmp/qoag-poc\nmvn -q package -DskipTests\njava -jar target/quarkus-app/quarkus-run.jar &\nsleep 8\ncurl -s http://127.0.0.1:8081/trigger\n\n# PATH=/repos/foo/bar\n# AUTH=Bearer SECRET\n```\n\n### Impact\n\nClients 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.","aliases":["CVE-2026-42333"],"modified":"2026-05-13T13:56:04.796279Z","published":"2026-05-04T21:15:55Z","database_specific":{"cwe_ids":["CWE-200"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-05-04T21:15:55Z","nvd_published_at":"2026-05-09T20:16:28Z"},"references":[{"type":"WEB","url":"https://github.com/quarkiverse/quarkus-openapi-generator/security/advisories/GHSA-fr8f-rwjx-f32v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42333"},{"type":"WEB","url":"https://github.com/quarkiverse/quarkus-openapi-generator/pull/1586"},{"type":"PACKAGE","url":"https://github.com/quarkiverse/quarkus-openapi-generator"},{"type":"WEB","url":"https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.11.1-lts"},{"type":"WEB","url":"https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.16.0-lts"},{"type":"WEB","url":"https://github.com/quarkiverse/quarkus-openapi-generator/releases/tag/2.17.0"}],"affected":[{"package":{"name":"io.quarkiverse.openapi.generator:quarkus-openapi-generator","ecosystem":"Maven","purl":"pkg:maven/io.quarkiverse.openapi.generator/quarkus-openapi-generator"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.16.0-lts"}]}],"versions":["0.1.0","0.10.0","0.11.0","0.12.0","0.2.0","0.3.0","0.3.1","0.4.0","0.4.1","0.5.0","0.6.0","0.6.1","0.7.0","0.8.0","0.9.0","1.0.0","1.0.1","1.1.0","1.2.0","1.2.1","1.3.0","1.3.1","1.3.10","1.3.11","1.3.12","1.3.13","1.3.14","1.3.15","1.3.16","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","2.0.0","2.1.0","2.1.1","2.10.0","2.10.0-lts","2.11.0","2.11.0-lts","2.11.1-lts","2.12.0","2.12.0-lts","2.12.1","2.12.1-lts","2.13.0","2.13.0-lts","2.14.0","2.14.0-lts","2.15.0","2.15.0-lts","2.16.0","2.2.0","2.2.1","2.2.10","2.2.11","2.2.12","2.2.13","2.2.14","2.2.15","2.2.16","2.2.2","2.2.4","2.2.5","2.2.6","2.2.7","2.2.8","2.2.9","2.3.0","2.4.0","2.4.1","2.4.2","2.4.6","2.4.7","2.4.8","2.5.0","2.6.0","2.6.0-lts","2.7.0","2.7.0-lts","2.7.1","2.7.1-lts","2.8.0","2.8.0-lts","2.8.1","2.8.1-lts","2.8.2","2.8.2-lts","2.9.0","2.9.0-lts","2.9.1-lts"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-fr8f-rwjx-f32v/GHSA-fr8f-rwjx-f32v.json"}},{"package":{"name":"io.quarkiverse.openapi.generator:quarkus-openapi-generator","ecosystem":"Maven","purl":"pkg:maven/io.quarkiverse.openapi.generator/quarkus-openapi-generator"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.16.0"},{"fixed":"2.17.0"}]}],"versions":["2.16.0","2.16.0-lts"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-fr8f-rwjx-f32v/GHSA-fr8f-rwjx-f32v.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}