Aug 1, 2026·6 min read·104 visits
Unsanitized WSDL operation names are interpolated directly into double-quoted strings within module_eval in Savon < 2.17.2. This enables remote code execution when parsing a malicious or compromised WSDL document.
A critical code injection vulnerability exists in Savon, a widely used SOAP client library for Ruby, prior to version 2.17.2. The vulnerability resides within the Savon::Model.all_operations module, where operation names fetched from a target Web Services Description Language (WSDL) document are dynamically evaluated via module_eval without sanitization. An attacker capable of manipulating the target WSDL document (e.g., through Man-in-the-Middle attacks, DNS hijacking, or Server-Side Request Forgery) can execute arbitrary Ruby code in the context of the parent application process.
Savon is an open-source SOAP client library for the Ruby programming language. The Savon::Model module provides a declarative DSL (Domain Specific Language) to map SOAP operations directly to Ruby class and instance methods. This mapping is handled automatically by the all_operations class method, which dynamically parses a remote or local WSDL document using the Wasabi library and defines corresponding helper methods.
The attack surface exists in the interface between the parsed WSDL definitions and the Ruby execution environment. The library dynamically generates method bindings by translating SOAP operation tags into Ruby identifiers. Because the translation pipeline accepts metadata fields from external documents without validation, an application that points Savon to an untrusted or interceptable WSDL endpoint exposes itself to code injection.
The vulnerability is classified under CWE-94 (Improper Control of Generation of Code). The impact of this vulnerability is severe, as successful exploitation results in unauthenticated, remote execution of arbitrary commands or scripting code under the permissions of the application worker process.
The root cause of this vulnerability lies in the implementation of the define_class_operation and define_instance_operation helper methods within the Savon::Model class. When Savon maps SOAP operations, it retrieves a collection of operation names as strings from the parsed WSDL. To dynamically establish helper methods for these operations, the library utilizes the module_eval meta-programming method.
Inside the vulnerable versions of lib/savon/model.rb, the dynamic method definitions were constructed by interpolating the snakecased operation names into double-quoted string templates. This template string was then compiled and executed by the Ruby interpreter. Because double-quoted strings inside a module_eval block are evaluated dynamically, any embedded interpolation or line terminators within the string literal are parsed as active Ruby syntax.
def define_class_operation(operation)
class_operation_module.module_eval %{
def #{StringUtils.snakecase(operation.to_s)}(locals = {})
client.call #{operation.inspect}, locals
end
}, __FILE__, __LINE__ - 4
endIf an operation name contains a newline sequence followed by valid Ruby syntax, the parser interprets the newline as a statement separator. The Ruby compiler executes the injected statements before defining any remaining, dummy structures required to avoid compile-time syntax errors. Consequently, the input string breaks out of the method definition context and executes arbitrary code directly during class evaluation.
In versions prior to 2.17.2, the code generation path in lib/savon/model.rb relied entirely on evaluating string literals. The following block contrasts the vulnerable implementation with the secure remediation implemented in the official patch.
# VULNERABLE CODE PATH (Savon < 2.17.2)
def define_class_operation(operation)
class_operation_module.module_eval %{
def #{StringUtils.snakecase(operation.to_s)}(locals = {})
client.call #{operation.inspect}, locals
end
}, __FILE__, __LINE__ - 4
end# PATCHED CODE PATH (Savon >= 2.17.2)
def define_class_operation(operation)
method_name = operation_method_name(operation)
class_operation_module.define_method(method_name) do |locals = {}|
client.call operation, locals
end
end
def operation_method_name(operation)
StringUtils.snakecase(operation.to_s).to_sym
endThe patch eliminates the module_eval compilation phase entirely. By replacing raw string generation with Module#define_method, the runtime treats the generated method name strictly as a Symbol and binds the body within a standard Ruby block closure. This architectural shift ensures that the operation name is processed purely as a data identifier rather than executable instructions, neutralising any embedded injection vectors.
Exploitation requires that an attacker can control the contents of the WSDL file parsed by the Savon client. This condition is met when the target application processes dynamic user-provided WSDL URLs, communicates with an upstream provider over unencrypted HTTP, or is susceptible to local file write vulnerabilities.
An attacker constructs a malicious WSDL containing a crafted operation name. By using the XML numeric entity to represent a newline inside the name attribute, the attacker escapes the method signature layout. The payload below demonstrates this technique:
<?xml version="1.0"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
name="ExploitService" targetNamespace="urn:exploit">
<wsdl:binding name="ExploitBinding" type="wsdl:ExploitPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="foo end `touch /tmp/pwned_savon_model` def x">
<soap:operation soapAction="urn:exploit#foo"/>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>When the victim application initializes the dynamic integrations by calling all_operations, the operation name is converted and executed. The resulting evaluated code maps directly to this structure:
def foo
end
`touch /tmp/pwned_savon_model`
def x(locals = {})
client.call "foo\nend\n`touch /tmp/pwned_savon_model`\ndef x", locals
endThe subshell execution `touch /tmp/pwned_savon_model` runs under the privileges of the active Ruby process immediately upon parsing.
The CVSS Base Score is evaluated at 8.1 (High) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. Although the vulnerability allows remote code execution without privileges or user interaction, the Attack Complexity is classified as High. An attacker must manipulate or intercept the WSDL transmission channel to feed the malicious definitions to the parser.
If the application process is running with root or administrative privileges, successful exploitation gives the attacker complete system compromise. This includes the ability to read sensitive environment variables, extract database credentials, modify application files, or pivot to internal network infrastructure.
Even in environments where network access is restricted, local file inclusion (LFI) or server-side parameter control could allow an attacker to direct Savon to parse a local, malicious file, resulting in local privilege escalation or container escape if host directories are poorly isolated.
To fully remediate CVE-2026-53510, software developers must upgrade the Savon gem to version 2.17.2 or later. This version replaces module_eval with safe define_method calls.
In scenarios where an immediate library upgrade is not possible, developers should avoid using the dynamic Savon::Model.all_operations initializer. Instead, configure Savon::Model by hardcoding trusted operation names using the explicit operations class method. This approach ensures that dynamic mapping logic is bypassed completely.
# SAFE COMPROMISE WORKAROUND
class SecureSoapService
extend Savon::Model
client wsdl: "http://example.com/untrusted.wsdl"
# Manually list safe operations, preventing automated evaluation
operations :get_user_profile, :update_user_profile
endAdditionally, applications fetching WSDLs from remote endpoints must enforce strict TLS peer verification. Do not disable SSL verification in the Savon client configuration, and avoid using insecure HTTP URLs to ingest dynamic integration configurations.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
savon savonrb | >= 0.9.8, < 2.17.2 | 2.17.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-94: Improper Control of Generation of Code ('Code Injection') |
| Attack Vector | Network (with High Complexity) |
| CVSS v3.1 Score | 8.1 |
| Exploit Status | Proof of Concept (PoC) documented in test suite |
| CISA KEV Status | Not listed |
| Remediation Status | Patched in Version 2.17.2 |
The product generates code or parses code using unsanitized inputs from upstream sources, allowing an attacker to inject arbitrary commands or scripts.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.
A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.
A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.
CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.
CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.