High

Tapir: Construction/decode RCE via property name -> raw case-class field (tapir-openapi-codegen)

  • Disclosed: 19.11.2026
  • Updated: 20.11.2026 10:00

The OpenAPI code generator (tapir-openapi-codegen-core) builds Scala source code using string templating and emitted several names and values from untrusted OpenAPI documents without escaping or validation. This allows the injection of arbitrary Scala code that executes at generated-code compile time and/or endpoint-assembly time, resulting in build- or codegen-time remote code execution from an attacker-controlled specification.

This advisory covers the full class of sinks, which share a single root cause and fix (PR #5395, commit e015939b7):

  • Object property names (placed into case-class fields)
  • Query, header, and path parameter names (placed into the endpoint input DSL)
  • Operation tags (placed into .tags(List(...)))

The fix routes identifier-position names through validation and quoting, and escapes string-literal values using JavaEscape.escapeString.

This advisory consolidates the separately reported sinks for query parameters (GHSA-h3vr-jggp-jw5v), header parameters (GHSA-3pjr-m3pf-r66v), and tags (GHSA-jc99-w66r-pcx5), which stem from the same issue.

What to do

Upgrade com.softwaremill.sttp.tapir:tapir-openapi-codegen-core to version 1.13.27 or later.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) com.softwaremill.sttp.tapir:tapir-openapi-codegen-core < 1.13.27 1.13.27

References

CVSS score -
CVSS vector
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
Weakness (CWE)
CWE-116, CWE-94, CWE-95
Platform
Java / Kotlin (Maven)
Package
com.softwaremill.sttp.tapir:tapir-openapi-codegen-core
Disclosed
19.11.2026
Updated
20.11.2026 10:00

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-gpcc-36pq-8qxr - CC BY 4.0

Vulnerability history: com.softwaremill.sttp.tapir:tapir-openapi-codegen-core

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.