CVE-2026-76090: Tapir: Construction/decode RCE via property name -> raw case-class field (tapir-openapi-codegen)
High
- OSV id
- GHSA-gpcc-36pq-8qxr
- Also known as
- CVE-2026-76090
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| com.softwaremill.sttp.tapir:tapir-openapi-codegen-core Maven |
< 1.13.27 | 1.13.27 |
How to fix it
Upgrade com.softwaremill.sttp.tapir:tapir-openapi-codegen-core to 1.13.27 or later.
# in pom.xml: set the <version> of com.softwaremill.sttp.tapir:tapir-openapi-codegen-core (or the property that holds it) to 1.13.27
mvn versions:use-dep-version -Dincludes=com.softwaremill.sttp.tapir:tapir-openapi-codegen-core -DdepVersion=1.13.27 -DforceVersion=true
# if it is an indirect dependency, pin it in <dependencyManagement>, then: mvn dependency:tree
- If it is an indirect dependency, pin it in <dependencyManagement> (Maven) or with a dependency constraint (Gradle), or upgrade the library that brings it in; `mvn dependency:tree` / `./gradlew dependencies` show which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
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
- GHSA-gpcc-36pq-8qxr on OSV.dev
- Web: https://github.com/softwaremill/tapir/security/advisories/GHSA-gpcc-36pq-8qxr
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-76090
- Web: https://github.com/softwaremill/tapir/pull/5395
- Web: https://github.com/softwaremill/tapir/commit/e015939b78df2de0fa3d3b8ed02961425e02145e
- Package: https://github.com/softwaremill/tapir
- Web: https://github.com/softwaremill/tapir/releases/tag/v1.13.27
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.