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

Mustache for Ruby: RCE using built-in method access

nday n’a pas encore récupéré la fiche CVE officielle de cet identifiant ; date de divulgation inconnue. Version corrigée : mustache 1.1.3. Cette vulnérabilité ne figure dans aucune des quatre sources de PoC. Aucune inscription au catalogue KEV de la CISA à ce jour.

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
étape actuelle
PAT
divulgation
date inconnue
délai avant correctif
T+? DIS : date inconnue
CVSS
9.8 CRITICAL v3.1

Cycle de vie

Axe en UTC ; point = minute exacte, barre large = date seule, creux = inconnue ou déduite.
date inconnue
DISdivulguée
aucune donnée
PATcorrectif
11-18T17:03Z
ANAanalyse
aucune donnée
POCPoC
aucune donnée
ITWexploitée
aucune donnée
KEVKEV
aucune donnée

Résumé

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

Journal des événements

source non datée ; vu en direct par nday
+PATcorrectif disponible

L’avis indique la version corrigée mustache 1.1.3. L’avis renvoie vers les commits de correction. Avis publié le  ; la date de publication du correctif lui-même n’est pas renseignée.

source ghsa GHSA-5hrj-7fc3-cmx9 · observé en direct par nday le · brut
{
  "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.

Échanges entre chercheurs

0 chercheur en a parlé ces 7 derniers jours

Publications sur X de chercheurs suivis par nday citant cette CVE, telles que publiées. nday ne les vérifie pas.

nday n’a encore recueilli aucune publication sur X d’un chercheur de sa liste citant cette CVE.

Discussion

0 comments

No comments yet.