nday
CVE-2026-130001 GHSA-5hrj-7fc3-cmx9

Mustache for Ruby: RCE using built-in method access

nday 尚未取得此編號的官方 CVE 紀錄,揭露時間不明。已於 mustache 1.1.3 修補。四個 PoC 來源皆未收錄。目前未列入 CISA KEV。

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

remote, unauthenticated
AV:N、PR:N、UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from GitHub advisory GHSA-5hrj-7fc3-cmx9
network
AV:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from GitHub advisory GHSA-5hrj-7fc3-cmx9
no authentication required
PR:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from GitHub advisory GHSA-5hrj-7fc3-cmx9
no user interaction
UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from GitHub advisory GHSA-5hrj-7fc3-cmx9
RubyGems
GHSA-5hrj-7fc3-cmx9: rubygems packages mustache
目前階段
PAT
揭露時間
時間不明
揭露 → 修補
T+? 揭露時間不明
CVSS
9.8 CRITICAL v3.1

生命週期

橫軸 UTC;點=精確到分鐘,寬條=僅日期,空心=不明或推斷。
時間不明
DIS揭露
尚無紀錄
PAT修補
11-18T17:03Z
ANA分析
尚無紀錄
POCPoC
尚無紀錄
ITW遭利用
尚無紀錄
KEVKEV
尚無紀錄

摘要

> [!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.

## PoC All discovered payloads were tested using ruby -e shell commands with mustache as the only explicitly required gem:

ruby -e 'require "mustache"; puts Mustache.render("PAYLOAD GOES HERE", key: "value")'

For initial information release, only the descriptions of the most important discovered payloads would be provided: - Universal RCE for a major Ruby version - File upload to RCE (3 different payloads) - Infinite memory consumption DoS - Infinite sleep DoS

Universal RCE payloads for other major Ruby versions and other payloads could exist, as the attack surface is very large. The presented list only contains payloads discovered using a fairly primitive approach.

> [!CAUTION] > Exploitation is not limited to the discovered Exploits/PoCs and real-life web applications are likely to expose even more dangerous functionality.

## Impact An attacker with the ability to modify the template string can execute arbitrary code in the context of the Ruby application.

## Rationale for CVSS assessment:

- Attack Vector: Network > No network requirements are present for exploitation. > Templating functionality is often provided on public websites. - Attack Complexity: Low > Attacker can expect reliable and repeatable exploitation. > There are no requirements beyond attacker's control. - Privileges Required: None > Mustache is often used for untrusted user-supplied templates. > Exploitation is often possible without authorization or by using self-registered accounts (without prior privileges). > Mustache by itself does not provide access control functionality. - User Interaction: None > Exploitation does not require any user interaction to achieve RCE. - Scope: Unchanged > The code is executed with the same privileges as the web application, without changing the scope. - Confidentiality Impact: High > Arbitrary code execution leads to the total loss of confidentiality. - Integrity Impact: High > Arbitrary code execution leads to the total loss of integrity. - Availability Impact: High > Arbitrary code execution can be used to achieve the total loss of availability.

## Resources [^1]: https://portswigger.net/knowledgebase/papers/serversidetemplateinjection.pdf [^2]: https://hackerone.com/reports/423541

Original text of GitHub advisory GHSA-5hrj-7fc3-cmx9, shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:N
Network: the attacker only needs to reach it over the network
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:N
None: no account or authorization needed
User interaction UI:N
None: no action by anyone other than the attacker

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

CVSS 3.1 vector from GitHub advisory GHSA-5hrj-7fc3-cmx9.

事件紀錄

來源無時間;nday 即時觀測
+PAT已有修補

公告列出的修補版本:mustache 1.1.3。公告附有修補 commit。公告發布於 ;修補本身的釋出時間沒有紀錄。

來源 ghsa GHSA-5hrj-7fc3-cmx9 · nday 於 即時觀測 · 原始
{
  "id": 479679,
  "type": "patch_released",
  "source": "ghsa",
  "url": "https://github.com/advisories/GHSA-5hrj-7fc3-cmx9",
  "occurred_at": null,
  "observed_at": "2026-11-18T17:03:52.559399Z",
  "is_backfill": false,
  "dedupe_key": "GHSA-5hrj-7fc3-cmx9",
  "detail": {
    "cvss": {
      "cvss_v3": {
        "score": 9.8,
        "vector_string": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
      },
      "cvss_v4": {
        "score": 0.0,
        "vector_string": null
      }
    },
    "cwes": [
      {
        "name": "Improper Control of Dynamically-Managed Code Resources",
        "cwe_id": "CWE-913"
      }
    ],
    "ghsa_id": "GHSA-5hrj-7fc3-cmx9",
    "packages": [
      {
        "name": "mustache",
        "ecosystem": "rubygems",
        "first_patched_version": "1.1.3",
        "vulnerable_version_range": "<= 1.1.2"
      }
    ],
    "severity": "critical",
    "references": [
      "https://github.com/mustache/mustache/security/advisories/GHSA-5hrj-7fc3-cmx9",
      "https://github.com/mustache/mustache/commit/b015f866942a6eb45ce4d34009f2ba6ff16ce4c1",
      "https://hackerone.com/reports/423541",
      "https://portswigger.net/knowledgebase/papers/serversidetemplateinjection.pdf",
      "https://github.com/advisories/GHSA-5hrj-7fc3-cmx9"
    ],
    "fix_commit_urls": [
      "https://github.com/mustache/mustache/commit/b015f866942a6eb45ce4d34009f2ba6ff16ce4c1"
    ],
    "github_reviewed_at": "2026-11-18T16:28:29Z",
    "advisory_updated_at": "2026-11-18T16:28:30Z",
    "source_code_location": "https://github.com/mustache/mustache",
    "advisory_published_at": "2026-11-18T16:28:29Z"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

研究員討論

近 7 天有 0 位研究員提及

名單內研究員在 X 上提及此 CVE 的貼文,照原文呈現,nday 不查核。

尚未收錄名單內研究員在 X 上提及此 CVE 的貼文。

Discussion

0 comments

No comments yet.