Vulnerability DatabaseCVE-2026-130001

CVE-2026-130001: 
Ruby vulnerability analysis and mitigation

Overview

CVE-2026-130001 is a Server-Side Template Injection (SSTI) / Remote Code Execution vulnerability in the Mustache template engine for Ruby, affecting versions 1.1.2 and earlier. The flaw allows unauthenticated remote attackers to execute arbitrary code by supplying a malicious template string that chains built-in Ruby methods. The vulnerability was privately disclosed to the maintainer and first published on August 20, 2026, with the GitHub Advisory Database entry updated on November 18, 2026. It carries a CVSS v3.1 base score of 9.8 (Critical) (GitHub Advisory).

Technical details

The root cause is improper restriction of method access within the Mustache Ruby template engine (CWE-913: Improper Control of Dynamically-Managed Code Resources). Despite Mustache being widely recommended as a "logic-less" and safe alternative to avoid SSTI, versions up to 1.1.2 failed to block access to built-in Ruby methods, enabling attackers to chain them within a template string to achieve arbitrary code execution. Critically, exploitation requires no special configuration, no objects passed to the engine, and no application-specific methods — the vulnerability is exploitable with only the mustache gem present. Additional application methods or installed gems can further expand the attack surface beyond the baseline (GitHub Advisory, mustache/mustache Advisory).

Impact

Successful exploitation grants an unauthenticated attacker arbitrary code execution in the context of the Ruby application process, resulting in total loss of confidentiality, integrity, and availability. Attackers can read sensitive application data and secrets, modify or destroy data, and disrupt service availability through denial-of-service payloads (e.g., infinite memory consumption or infinite sleep). Because code runs with the same privileges as the web application, lateral movement within the hosting environment is feasible depending on the application's permissions and network access (GitHub Advisory).

Exploitability

As of the initial advisory release, no public proof-of-concept code has been published, though the advisory explicitly states that full PoC details will be added in a future update. The advisory describes multiple payload categories discovered — including universal RCE for major Ruby versions, file-upload-to-RCE chains, and DoS payloads — indicating a broad and well-researched attack surface. There is currently no evidence of in-the-wild exploitation, no known threat actor attribution, and the CVE status remains "Reserved." No EPSS score or CISA KEV listing is available at this time (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify target: Locate Ruby web applications that use the mustache gem (version ≤ 1.1.2) and accept user-controlled template input — such as email template editors, report builders, or notification customization features.
  2. Confirm vulnerability: Verify the application renders user-supplied Mustache templates by submitting a benign test payload (e.g., {{#lambda}}test{{/lambda}}) and observing the output.
  3. Craft malicious template: Construct a Mustache template payload that chains built-in Ruby methods accessible through the template context to reach code execution primitives. The general test harness is: ruby -e 'require "mustache"; puts Mustache.render("PAYLOAD GOES HERE", key: "value")'
  4. Submit payload: Deliver the crafted template string to the vulnerable input field or API endpoint. No authentication, special privileges, or user interaction is required.
  5. Achieve RCE: The Mustache engine evaluates the chained method calls, executing arbitrary system commands in the context of the Ruby application process (e.g., reading /etc/passwd, establishing a reverse shell, or exfiltrating environment variables containing secrets) (GitHub Advisory, mustache/mustache Advisory).

Indicators of compromise

  • Logs: Application logs showing unexpected or malformed Mustache template strings submitted via user input fields; Ruby exception stack traces related to unexpected method calls during template rendering.
  • Process: Unusual child processes spawned by the Ruby application process (e.g., /bin/sh, curl, wget, bash); processes consuming abnormally high memory or running indefinitely (indicative of DoS payloads).
  • Network: Unexpected outbound connections from the Ruby application server to external IPs, particularly on non-standard ports (potential reverse shell or data exfiltration); DNS lookups for attacker-controlled domains originating from the application process.
  • File System: Unexpected files written to the application directory or /tmp, including uploaded files that may be used as a second-stage payload in file-upload-to-RCE attack chains (GitHub Advisory).

Mitigation and workarounds

Upgrade the mustache gem to version 1.1.3 or later, which addresses the method access restriction flaw (commit b015f86) (mustache/mustache commit). If immediate patching is not possible, avoid processing untrusted or user-supplied Mustache template strings entirely — treat all template content as privileged input. Applications should audit any feature that allows users to define or modify template strings and restrict or sandbox such functionality until the patch is applied (GitHub Advisory).

Community reactions

The vulnerability was credited to researcher vladko312, who performed responsible disclosure directly to the maintainer before the project had security advisories enabled. The advisory notes that full PoC details are intentionally withheld at initial release to provide a remediation window, with complete technical details to be published later. Coverage has appeared on threat intelligence aggregators including VulDB and Offseq Radar shortly after the advisory was published (VulDB, Offseq Radar).

Additional resources


Source: This report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-4859-2mvh-r787HIGH7.1
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-6gjg-cqh9-p2xmMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-jjpx-qcfc-pqwpMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-fxxw-9rf3-3f2wMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-wcp8-qw9q-vjppMEDIUM4.9
  • Ruby logoRuby
  • doorkeeper-openid_connect
NoYesNov 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management