CVE-2026-40180 — quarkus-openapi-generator
Fix: quarkiverse/quarkus-openapi-generator@08b4064CVE-2026-40180 is a Path Traversal vulnerability in io.quarkiverse.openapi.generator:quarkus-openapi-generator. A fix is available for io.quarkiverse.openapi.generator:quarkus-openapi-generator — see the affected versions and patch details below.
Zip Slip Path Traversal in quarkus-openapi-generator ApicurioCodegenWrapper class
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-40180.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
io.quarkiverse.openapi.generator:quarkus-openapi-generatorReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A path traversal vulnerability was discovered in the quarkus-openapi-generator extension
Details
The unzip() method in ApicurioCodegenWrapper.java extracts ZIP entries without validating that the resolved file path stays within the intended output directory. At line 101, the destination is constructed as new File(toOutputDir, entry.getName()) and the content is written immediately. A malicious ZIP archive containing entries with path traversal sequences (e.g., ../../malicious.java) would write files outside the target directory.
The interesting thing is that the client module in the same repository already has the correct fix. OpenApiGeneratorStreamCodeGen.java at line 137 performs proper normalize() and startsWith() validation. The server module was simply missed.
PoC
This vulnerability is exploitable when an attacker controls or can intercept the ZIP archive served by the Apicurio registry. In environments where the registry connection is over an untrusted network or where TLS is not properly configured, exploitation becomes practical. The attack occurs at build/codegen time.
- Create a ZIP file containing an entry named
../../proof.txtwith arbitrary content - Configure quarkus-openapi-generator to use the server (Apicurio) code generation path
- Serve the malicious ZIP from a controlled or MITM'd Apicurio registry endpoint
- Trigger code generation
- Observe that
proof.txtis written two directories above the intended output
Impact
An attacker who can serve a crafted ZIP to the code generation pipeline could write arbitrary files on the build machine. This could overwrite source files, inject malicious code into the build output, or modify configuration files. In CI/CD environments, this could lead to supply chain compromise.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | io.quarkiverse.openapi.generator:quarkus-openapi-generator | all versions | 2.16.0io.quarkiverse.openapi.generator:quarkus-openapi-generator:2.16.0 |
Affected Products
quarkus openapi generatorquarkiverseDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.quarkiverse.openapi.generator:quarkus-openapi-generator, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update io.quarkiverse.openapi.generator:quarkus-openapi-generator to 2.16.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-40180 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2026-40180 in your dependencies?
Find it across Maven, including transitive dependencies.