- Accueil
- Vulnérabilités
- CVE-2026-41316
CVE-2026-41316
ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced…
Résumé
ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an `@_init` instance variable guard in `ERB#result` and `ERB#run` to prevent code execution when an ERB object is reconstructed via `Marshal.load` (deserialization). However, three other public methods that also evaluate `@src` via `eval()` were not given the same guard: `ERB#def_method`, `ERB#def_module`, and `ERB#def_class`. An attacker who can trigger `Marshal.load` on untrusted data in a Ruby application that has `erb` loaded can use `ERB#def_module` (zero-arg, default parameters) as a code execution sink, bypassing the `@_init` protection entirely. ERB 4.0.3.1, 4.0.4.1, 6.0.1.1, and 6.0.4 patch the issue.
Aucune traduction française : description d’origine affichée.
Produits et versions affectés
Rubygems (4 ligne(s))
Correctif
Mise à jour — RubyGems/erb 4.0.3.1; RubyGems/erb 4.0.4.1; RubyGems/erb 6.0.1.1; RubyGems/erb 6.0.4source officielle
Source : GitHub Advisory
Contournement
Aucun contournement renseigné.
Savoir si vous êtes touché
Aucune méthode de vérification renseignée.
Chronologie
- — Publication de la CVE (cve)
Avis CERT-FR
- GHSA-q339-8rmv-2mhv — ERB has an @_init deserialization guard bypass via def_module / def_method / def_class 24 avr. 2026
Références
- https://github.com/ruby/erb/security/advisories/GHSA-q339-8rmv-2mhvWEB
- https://access.redhat.com/errata/RHSA-2026:18030WEB
- https://access.redhat.com/errata/RHSA-2026:18039WEB
- https://access.redhat.com/errata/RHSA-2026:18065WEB
- https://access.redhat.com/errata/RHSA-2026:20596WEB
- https://access.redhat.com/errata/RHSA-2026:20606WEB
- https://access.redhat.com/errata/RHSA-2026:20614WEB
- https://access.redhat.com/errata/RHSA-2026:20670WEB
- https://access.redhat.com/errata/RHSA-2026:26312WEB
- https://access.redhat.com/errata/RHSA-2026:26655WEB
- https://access.redhat.com/errata/RHSA-2026:33462WEB
- https://access.redhat.com/errata/RHSA-2026:33478WEB
- https://access.redhat.com/errata/RHSA-2026:35834WEB
- https://access.redhat.com/errata/RHSA-2026:37238WEB
- https://access.redhat.com/security/cve/CVE-2026-41316WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2461369WEB
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41316.jsonWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-41316ADVISORY
- https://github.com/ruby/erb/commit/ef61b591b270f8ba58d47f12472a1c53a77b4d61WEB
- https://github.com/ruby/erb/commit/dd34ce41031327269a5fb83b0bc2c0d852895e9fWEB
- https://github.com/ruby/erb/commit/c3b721f7f7570c23e3423590af0419c1b10e1255WEB
- https://github.com/ruby/erb/commit/9d017be4e375cdd058650ce528ee6adfead20cacWEB
- https://www.ruby-lang.org/en/news/2026/04/21/erb-cve-2026-41316WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/erb/CVE-2026-41316.ymlWEB
- https://github.com/ruby/erbPACKAGE
Provenance des données
- Statut
- NVD
- Date de publication
- NVD
- Description
- NVD
- Score CVSS
- CNA (éditeur ou attributeur)
- Faiblesse (CWE)
- CNA (éditeur ou attributeur)
- Vecteur CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1, CNA:security-advisories@github.com)- Faiblesse
- CWE-693 · Autre (CWE-693)