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

State
Published
Severity
8.4 High
Published
Nov 18, 2026
Updated
Nov 19, 2026
Reserved
Aug 18, 2026

Read the record on cve.org

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.

ProductVersions
tapir softwaremill< 1.13.27 Affected

Weaknesses

  • CWE-94 Improper Control of Generation of Code
  • CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code
  • CWE-116 Improper Encoding or Escaping of Output

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.