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

Mustache for Ruby: RCE using built-in method access

本站还没有取到这个编号的官方 CVE 记录,披露时间未知。已有补丁记录,修复版本是 mustache 1.1.3。四个 PoC 来源都还没有收录。尚未列入 CISA KEV。

这些标签的依据

这些标签由 nday 按固定规则从下列事实自动推导,不是 NVD、编号分配方或其他来源给出的。全部标签和规则见 ~/tags。

远程未授权
GitHub 公告 GHSA-5hrj-7fc3-cmx9 给出的 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 AV:N、PR:N、UI:N
网络
GitHub 公告 GHSA-5hrj-7fc3-cmx9 给出的 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 AV:N
无需认证
GitHub 公告 GHSA-5hrj-7fc3-cmx9 给出的 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 PR:N
无需用户交互
GitHub 公告 GHSA-5hrj-7fc3-cmx9 给出的 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 UI:N
RubyGems
GHSA-5hrj-7fc3-cmx9:rubygems 包 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

以上是 GitHub 安全公告 GHSA-5hrj-7fc3-cmx9 中的原文,未经改写。

利用条件

按 CVSS 向量说明攻击需要的条件。
攻击途径 AV:N
网络:攻击者只要能通过网络访问到目标即可
攻击复杂度 AC:L
低:不依赖特殊条件,攻击者可预期重复成功
所需权限 PR:N
无:不需要账号或授权
用户交互 UI:N
无:除攻击者外不需要任何人配合

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

CVSS 3.1 向量,来自 GitHub 安全公告 GHSA-5hrj-7fc3-cmx9。

事件记录

来源未给时间,本站实时观测
+PAT补丁发布

公告给出修复版本 mustache 1.1.3。公告附有修复提交。公告本身发布于 ,补丁实际发布时间没有记录。

来源 ghsa GHSA-5hrj-7fc3-cmx9 · 本站 实时观测 · 原始记录
{
  "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"
  }
}

纠错

报告错误或缺失

页面有误或缺失?告诉编辑;采纳后在本页修订记录公开说明,上游数据不会被改动。

研究员讨论

近 7 天有 0 位研究员提到

研究员在 X 上提到此 CVE 的帖子,原文照录,nday 不核实。

尚未采集到名单内研究员在 X 上提到此 CVE 的帖子。

讨论

0 条评论

还没有评论。