8.4high
Tapir: Construction/decode RCE via property name -> raw case-class field (tapir-openapi-codegen)
- Severity
- 8.4high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.20% (higher than 6% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gpcc-36pq-8qxr
Description
Tapir is a Scala library for describing HTTP APIs and exposing, consuming, and documenting them using open standards. Prior to 1.13.27, tapir-openapi-codegen-core generates Scala source from untrusted OpenAPI documents by interpolating object property names, query, header, and path parameter names, and operation tags without context-appropriate validation or escaping. Crafted names or values can break out of generated identifier or string-literal contexts and inject arbitrary Scala that executes when generated code is compiled or endpoints are assembled. This is a code-generation and build-time issue and does not make a running tapir server directly exploitable. This issue is fixed in version 1.13.27.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| softwaremill tapir | < 1.13.27 | CVE List |
| com.softwaremill.sttp.tapir:tapir-openapi-codegen-core (Maven) | before 1.13.27 | GitHub Advisory Database |
All scores
| GitHub_M | 8.4high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
Tapir is a Scala library for describing HTTP APIs and exposing, consuming, and documenting them using open standards. Prior to 1.13.27, tapir-openapi-codegen-core generates Scala source from untrusted OpenAPI documents by interpolating object property names, query, header, and path parameter names, and operation tags without context-appropriate validation or escaping. Crafted names or values can break out of generated identifier or string-literal contexts and inject arbitrary Scala that executes when generated code is compiled or endpoints are assembled. This is a code-generation and build-time issue and does not make a running tapir server directly exploitable. This issue is fixed in version 1.13.27.
GitHub Advisory Database
The OpenAPI code generator (tapir-openapi-codegen-core) builds Scala source by string templating and emitted several names/values from the (untrusted) OpenAPI document without escaping or validation, allowing injection of arbitrary Scala that runs at generated-code compile time and/or endpoint-assembly time (build/codegen-time RCE from an attacker-controlled spec).
This advisory covers the full class of sinks, all sharing one root cause and one fix (PR #5395, commit e015939b7): object property names (-> case-class fields), query/header/path parameter names (-> endpoint input DSL), and operation tags (-> .tags(List(...))). The fix routes identifier-position names through validation/quoting and string-literal values through JavaEscape.escapeString.
Consolidates the separately-reported query-param (GHSA-h3vr-jggp-jw5v), header-param (GHSA-3pjr-m3pf-r66v) and tag (GHSA-jc99-w66r-pcx5) sinks, which are the same issue.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-76090 changed 2026-11-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gpcc-36pq-8qxr changed 2026-11-19 | CC-BY-4.0 |
| NVD | CVE-2026-76090 changed 2026-11-19 | Public domain |