← VULNERABILITIES

CVE-2026-130001

Mustache for Ruby: RCE using built-in method access

Critical · 9.8Fix available
CVSS
9.8
EPSS
—
Published
2026-11-18
Age
18d old
Modified
2026-11-18
Product
RubyGems mustache
Aliases
GHSA-5hrj-7fc3-cmx9

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Description

> [!NOTE] > The vulnerability was fully disclosed to the maintainer in private prior to security advisories were enabled for the project. > This advisory presents a limited information for initial release to provide a time window for installing updates. Full information with PoCs would be added later. ## Summary Mustache template engine for Ruby in versions 1.1.2 and earlier allows remote attackers to achieve arbitrary code execution through accessing specific built-in methods in an attacker-supplied template. ## Details Mustache is often suggested as a safe simple template language to avoid SSTI vulnerabilities.[^1] [^2] Mustache for Ruby up to version 1.1.2 did not properly restrict method access which allowed chaining multiple built-in methods to achieve arbitrary code execution. > [!IMPORTANT] > Successful exploitation of this vulnerability does not depend on any configuration or objects passed to the template engine. > An attacker controlling the template string can achieve arbitrary code execution without any additional requirements. Additional methods provided by the application or installed gems can further expand the attack surface but exploitation was proven without them.

Fixed in

1.1.3

Affected packages

EcosystemPackageRangeFixed
RubyGemsmustache<= 1.1.21.1.3
RubyGemsmustache>=0, <1.1.31.1.3

Sources

References

JSON