/

CVE-2026-108598

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-94) in Floci VTL Template Engine

CVE-2026-108598

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Floci versions 1.1.0 through before 2.2.0 contain a code injection vulnerability in the VtlTemplateEngine. An unauthenticated attacker who can create a REST API with a MOCK integration may abuse unrestricted Velocity templates to execute operating-system commands in the Floci JVM.

Floci versions 1.1.0 through before 2.2.0 contain a code injection vulnerability in the VtlTemplateEngine. An unauthenticated attacker who can create a REST API with a MOCK integration may abuse unrestricted Velocity templates to execute operating-system commands in the Floci JVM.

Affected context

The vulnerability occurs in Floci deployments that expose functionality for creating REST APIs and configuring MOCK integrations. It becomes risky when user-controlled or insufficiently restricted Velocity mapping templates are evaluated by the VtlTemplateEngine with access to reflective Java capabilities such as Runtime or ProcessBuilder.

The vulnerability occurs in Floci deployments that expose functionality for creating REST APIs and configuring MOCK integrations. It becomes risky when user-controlled or insufficiently restricted Velocity mapping templates are evaluated by the VtlTemplateEngine with access to reflective Java capabilities such as Runtime or ProcessBuilder.

Exploit preconditions

  • Attack surface: REST API and MOCK integration configuration
  • Required access: No authentication, where the affected API-creation functionality is publicly reachable
  • Trigger point: Evaluation of a user-controlled Velocity mapping template
  • Why exploitation is possible: The template environment permits unrestricted access to Java reflection or process-launching classes, allowing template expressions to cross from data transformation into command execution
  • Attack surface: REST API and MOCK integration configuration
  • Required access: No authentication, where the affected API-creation functionality is publicly reachable
  • Trigger point: Evaluation of a user-controlled Velocity mapping template
  • Why exploitation is possible: The template environment permits unrestricted access to Java reflection or process-launching classes, allowing template expressions to cross from data transformation into command execution

Why this happens

The underlying flaw is the evaluation of unrestricted template expressions in a context that exposes powerful Java objects and reflection mechanisms. Rather than limiting templates to data transformation operations, the engine permits access to capabilities that can start operating-system processes. This behavior maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced template content is interpreted as executable logic.

The underlying flaw is the evaluation of unrestricted template expressions in a context that exposes powerful Java objects and reflection mechanisms. Rather than limiting templates to data transformation operations, the engine permits access to capabilities that can start operating-system processes. This behavior maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced template content is interpreted as executable logic.

Potential impact

  • Attackers may execute arbitrary operating-system commands in the Floci JVM process
  • The application environment could be compromised
  • Sensitive files, credentials, or configuration data may be accessed
  • Attackers could alter application behavior or tamper with hosted API responses
  • The compromised process may be used for lateral movement, depending on its privileges and network access
  • Attackers may execute arbitrary operating-system commands in the Floci JVM process
  • The application environment could be compromised
  • Sensitive files, credentials, or configuration data may be accessed
  • Attackers could alter application behavior or tamper with hosted API responses
  • The compromised process may be used for lateral movement, depending on its privileges and network access

General mitigation guidance

Mitigation generally focuses on removing executable capabilities from template processing and reducing trust in template definitions.

Common defensive patterns include:

  • Restricting templates to an allowlisted, non-executable expression subset
  • Disabling reflection, class access, and process-launching functionality in the template context
  • Separating API definition from template execution and applying strict schema validation
  • Requiring authentication and authorization for API and integration creation
  • Running Floci with least-privilege operating-system and network permissions
  • Avoiding sensitive credentials and broad filesystem access in the JVM environment
  • Applying sandboxing or isolated worker boundaries where template execution is unavoidable

Mitigation generally focuses on removing executable capabilities from template processing and reducing trust in template definitions.

Common defensive patterns include:

  • Restricting templates to an allowlisted, non-executable expression subset
  • Disabling reflection, class access, and process-launching functionality in the template context
  • Separating API definition from template execution and applying strict schema validation
  • Requiring authentication and authorization for API and integration creation
  • Running Floci with least-privilege operating-system and network permissions
  • Avoiding sensitive credentials and broad filesystem access in the JVM environment
  • Applying sandboxing or isolated worker boundaries where template execution is unavoidable

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review rules targeting unrestricted Velocity evaluation and reflective class access
  • Review signals showing template engines exposed to request-controlled or administrator-controlled content without capability restrictions
  • Tests that verify templates cannot access class loaders, reflection APIs, process builders, or runtime execution interfaces
  • Runtime monitoring for unexpected child processes, shell invocations, or unusual outbound connections from the Floci JVM
  • Policy enforcement requiring authentication and approval for REST API and MOCK integration creation
  • Automated security review tools that flag template evaluation with dangerous object exposure

Organizations can look for this class of issue through:

  • Static analysis and code review rules targeting unrestricted Velocity evaluation and reflective class access
  • Review signals showing template engines exposed to request-controlled or administrator-controlled content without capability restrictions
  • Tests that verify templates cannot access class loaders, reflection APIs, process builders, or runtime execution interfaces
  • Runtime monitoring for unexpected child processes, shell invocations, or unusual outbound connections from the Floci JVM
  • Policy enforcement requiring authentication and approval for REST API and MOCK integration creation
  • Automated security review tools that flag template evaluation with dangerous object exposure

Sources

SourceLink
github.comgithub.com/floci-io/floci
github.comgithub.com/floci-io/floci/blob/560b3e4aae61cea3ac7d4d51843bdffd0e3085fd/src/main/java/io/github/hectorvent/floci/services/apigateway/VtlTemplateEngine.java#L74-L114
github.comgithub.com/floci-io/floci/commit/144b90e6fa861a5ac882e99a090d503da01945c4
github.comgithub.com/floci-io/floci/releases/tag/2.2.0
github.comgithub.com/floci-io/floci/security/advisories/GHSA-3p4c-wp7w-mgjx
github.comgithub.com/ghostx-86/exploitarium/tree/main/floci-apigateway-vtl-rce-poc
vulncheck.comvulncheck.com/advisories/floci-1.1.0-before-2.2.0-rce-via-api-gateway-vtl-mapping-templates

Frequently asked

questions

It can be remotely exploitable when the REST API or configuration interface permits unauthenticated creation of APIs and MOCK integrations. Exposure and deployment-specific access controls determine the practical scope.

The described attack does not require authentication when the relevant API-creation capability is publicly available. If that capability is protected, the attacker would first need the permitted account or role.

Use a restricted template language or sandboxed execution context that cannot access Java reflection, runtime process APIs, or filesystem and network capabilities.

Treat templates as untrusted input, enforce authentication and authorization for configuration changes, apply allowlisted expression features, and test that template evaluation cannot invoke operating-system functionality.

It can be remotely exploitable when the REST API or configuration interface permits unauthenticated creation of APIs and MOCK integrations. Exposure and deployment-specific access controls determine the practical scope.

The described attack does not require authentication when the relevant API-creation capability is publicly available. If that capability is protected, the attacker would first need the permitted account or role.

Use a restricted template language or sandboxed execution context that cannot access Java reflection, runtime process APIs, or filesystem and network capabilities.

Treat templates as untrusted input, enforce authentication and authorization for configuration changes, apply allowlisted expression features, and test that template evaluation cannot invoke operating-system functionality.

Find out what's already
exploitable in your codebase.