CVE-2026-76090
JSON

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 packageVersionsReported by
softwaremill tapir< 1.13.27CVE List
com.softwaremill.sttp.tapir:tapir-openapi-codegen-core (Maven)before 1.13.27GitHub Advisory Database

All scores

GitHub_M8.4high CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS: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

CWE-94CWE-95CWE-116

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

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

SourceRecordLicence
CVE ListCVE-2026-76090 changed 2026-11-19CVE Terms of Use
GitHub Advisory DatabaseGHSA-gpcc-36pq-8qxr changed 2026-11-19CC-BY-4.0
NVDCVE-2026-76090 changed 2026-11-19Public domain