Mustache Ruby gem: RCE via built-in method access in attacker-supplied templates (CVE-2026-130001)
Severity: critical · Patch status: patched · Since 2026-08-20 · CVE-2026-130001
Mustache for Ruby 1.1.2 and earlier does not restrict method access, so anyone who controls the template string can chain built-in methods to run code inside the Ruby application. Per the advisory, no special configuration or objects passed to the engine are needed. The maintainers published a repository advisory and released 1.1.3 on 2026-08-20. The GitHub advisory database added the GHSA and CVE alias on 2026-11-18, with a CVSS 3.1 score of 9.8. The advisory names payload classes (universal RCE for a major Ruby version, file-upload RCE, memory and sleep DoS) but withholds full proof-of-concept code. No exploitation has been reported, and the CVE is not yet in NVD or CVE.org. The exposure is any code path that renders template text supplied by users or other untrusted input. Upgrade to 1.1.3 and stop rendering untrusted template text until then.
What to do
- Upgrade the mustache gem to 1.1.3 or later
- Find any code path where template text comes from users or other untrusted input, and stop rendering it with Mustache until upgraded
- Check Gemfile.lock and CI for mustache 1.1.2 or earlier, including transitive dependencies
- Review application logs for unexpected process execution or template-rendering errors
Fixed versions
Sources
All live incidents on Threat Watch