CVEMETERBack to radar
OFFICIAL RECORD · Ruby

CVE-2026-41316

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 8.1 · high

ERB has an @_init deserialization guard bypass via def_module / def_method / def_class

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.

Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.

Severity and exploitation evidence

EPSS: 1.131% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.

CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:25:55.090Z. Public exploit availability is not used to set this status.

CVSS 3.1 · 8.1 · published by GitHub_M
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Assessment source · checked 2026-11-19T12:58:29.628Z

CVSS 3.1 · 8.1 · published by Ubuntu Security
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Assessment source · checked 2026-11-19T12:49:27.214Z

Verification by field

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T16:25:55.090ZCISA KEV
cvssverified2026-11-19T12:58:29.628ZCVE Program
epssverified2026-11-19T16:04:49.616ZFIRST EPSS
patchesunknownunknownunknown
affectedverified2026-11-19T12:58:29.628ZCVE Program
lifecycleverified2026-11-19T12:58:29.628ZCVE Program

Affected versions and configuration

ruby erb; default status: unknown: < 4.0.3.1 [affected; scheme: unspecified]; = 4.0.4 [affected; scheme: unspecified]; >= 5.0.0, < 6.0.1.1 [affected; scheme: unspecified]; >= 6.0.2, < 6.0.4 [affected; scheme: unspecified]

Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.

CVE Program · cve-json · full conditions
{
  "affected": [
    {
      "vendor": "ruby",
      "product": "erb",
      "versions": [
        {
          "status": "affected",
          "version": "< 4.0.3.1"
        },
        {
          "status": "affected",
          "version": "= 4.0.4"
        },
        {
          "status": "affected",
          "version": ">= 5.0.0, < 6.0.1.1"
        },
        {
          "status": "affected",
          "version": ">= 6.0.2, < 6.0.4"
        }
      ]
    }
  ],
  "additionalContainers": [
    {
      "title": "CISA ADP Vulnrichment",
      "metrics": [
        {
          "other": {
            "type": "ssvc",
            "content": {
              "id": "CVE-2026-41316",
              "role": "CISA Coordinator",
              "options": [
                {
                  "Exploitation": "none"
                },
                {
                  "Automatable": "no"
                },
                {
                  "Technical Impact": "total"
                }
              ],
              "version": "2.0.3",
              "timestamp": "2026-04-25T01:45:02.467085Z"
            }
          }
        }
      ],
      "providerMetadata": {
        "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "shortName": "CISA-ADP",
        "dateUpdated": "2026-04-25T01:45:43.173Z"
      }
    },
    {
      "title": "erb: ERB: Arbitrary code execution via deserialization bypass",
      "metrics": [
        {
          "other": {
            "type": "Red Hat severity rating",
            "content": {
              "value": "Important",
              "namespace": "https://access.redhat.com/security/updates/classification/"
            }
          }
        },
        {
          "format": "CVSS",
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 8.1,
            "attackVector": "NETWORK",
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "integrityImpact": "HIGH",
            "userInteraction": "NONE",
            "attackComplexity": "HIGH",
            "availabilityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "HIGH"
          }
        }
      ],
      "affected": [
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:10.1"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 10",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.3.10-12.el10_1",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:10.2"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 10",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:4.0.3-34.el10_2",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby4.0",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux_eus:10.0"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 10.0 Extended Update Support",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.3.10-11.el10_0.1",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:enterprise_linux:8"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 8",
          "versions": [
            {
              "status": "unaffected",
              "version": "8100020260428163940.489197e6",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby:3.3",
          "collectionURL": "https://catalog.redhat.com/software/containers/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:enterprise_linux:9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9",
          "versions": [
            {
              "status": "unaffected",
              "version": "9070020260428163621.9",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby:3.3",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:enterprise_linux:9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.0.7-166.el9_7",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:enterprise_linux:9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9",
          "versions": [
            {
              "status": "unaffected",
              "version": "9080020260513131334.9",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby:4.0",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_e4s:9.0"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.0.4-160.2.el9_0",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_e4s:9.2"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.0.4-161.el9_2.3",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_e4s:9.4"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.0.7-162.el9_4.2",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_e4s:9.4"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions",
          "versions": [
            {
              "status": "unaffected",
              "version": "9040020260520083544.9",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby:3.3",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_eus:9.6"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.6 Extended Update Support",
          "versions": [
            {
              "status": "unaffected",
              "version": "0:3.0.7-165.el9_6.1",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhel_eus:9.6"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9.6 Extended Update Support",
          "versions": [
            {
              "status": "unaffected",
              "version": "9060020260630075016.9",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "ruby:3.3",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:6"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 6",
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:7"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 7",
          "packageName": "ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:8"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 8",
          "packageName": "ruby:2.5/ruby",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:hummingbird:1"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Hardened Images",
          "packageName": "ruby3.3",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:hummingbird:1"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Hardened Images",
          "packageName": "ruby3.4",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:hummingbird:1"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Hardened Images",
          "packageName": "ruby4.0",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:openshift:4"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift Container Platform 4",
          "packageName": "openshift/ose-rhel-coreos-9",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        }
      ],
      "timeline": [
        {
          "lang": "en",
          "time": "2026-04-24T03:01:16.620Z",
          "value": "Reported to Red Hat."
        },
        {
          "lang": "en",
          "time": "2026-04-24T02:35:41.160Z",
          "value": "Made public."
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "RHSA-2026:33478: Red Hat Enterprise Linux AppStream EUS (v. 10.0), Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:18065: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:20606: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:20614: Red Hat Enterprise Linux AppStream (v. 8)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:20670: Red Hat Enterprise Linux AppStream E4S (v.9.0)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:35834: Red Hat Enterprise Linux AppStream E4S (v.9.2)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:26312: Red Hat Enterprise Linux AppStream E4S (v.9.4)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:26655: Red Hat Enterprise Linux AppStream E4S (v.9.4)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:33462: Red Hat CodeReady Linux Builder EUS (v.9.6), Red Hat Enterprise Linux AppStream EUS (v.9.6)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:37238: Red Hat Enterprise Linux AppStream EUS (v.9.6)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:18039: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux CodeReady Linux Builder (v. 9)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:18030: Red Hat Enterprise Linux AppStream (v. 9)"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:20596: Red Hat Enterprise Linux AppStream (v. 9)"
        }
      ],
      "x_adpType": "supplier",
      "datePublic": "2026-04-24T02:35:41.160Z",
      "references": [
        {
          "url": "https://access.redhat.com/security/cve/CVE-2026-41316",
          "tags": [
            "vdb-entry",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2461369",
          "name": "RHBZ#2461369",
          "tags": [
            "issue-tracking",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41316.json",
          "tags": [
            "x_sadp-csaf-vex"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:33478",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:18065",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:20606",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:20614",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:20670",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:35834",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:26312",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:26655",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:33462",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:37238",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:18039",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:18030",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:20596",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        }
      ],
      "x_generator": {
        "engine": "sadp-cli 1.0.0"
      },
      "descriptions": [
        {
          "lang": "en",
          "value": "A flaw was found in ERB, a templating system for Ruby. An attacker who can trigger deserialization of untrusted data in a Ruby application can bypass existing protections. This vulnerability allows for arbitrary code execution by exploiting specific public methods that evaluate template source code, which were not properly guarded against deserialization attacks."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "type": "CWE",
              "cweId": "CWE-502",
              "description": "Deserialization of Untrusted Data"
            }
          ]
        }
      ],
      "providerMetadata": {
        "orgId": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "shortName": "redhat-SADP",
        "dateUpdated": "2026-08-24T12:06:46.132Z"
      }
    }
  ]
}
Archived source JSON
Ubuntu Security · ubuntu-package · full conditions
[
  {
    "name": "ruby3.2",
    "debian": "https://tracker.debian.org/pkg/ruby3.2",
    "source": "https://ubuntu.com/security/cve?package=ruby3.2",
    "ubuntu": "https://packages.ubuntu.com/search?suite=all&section=all&arch=any&searchon=sourcenames&keywords=ruby3.2",
    "statuses": [
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "jammy"
      },
      {
        "pocket": "security",
        "status": "needs-triage",
        "component": null,
        "description": "",
        "release_codename": "noble"
      },
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "questing"
      },
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "resolute"
      },
      {
        "pocket": "security",
        "status": "needs-triage",
        "component": null,
        "description": "",
        "release_codename": "upstream"
      },
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "stonking"
      }
    ]
  }
]
Archived source JSON
Ubuntu Security · ubuntu-package · full conditions
[
  {
    "name": "ruby3.3",
    "debian": "https://tracker.debian.org/pkg/ruby3.3",
    "source": "https://ubuntu.com/security/cve?package=ruby3.3",
    "ubuntu": "https://packages.ubuntu.com/search?suite=all&section=all&arch=any&searchon=sourcenames&keywords=ruby3.3",
    "statuses": [
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "jammy"
      },
      {
        "pocket": "security",
        "status": "DNE",
        "component": null,
        "description": "",
        "release_codename": "noble"
      },
      {
        "pocket": "security",
        "status": "needs-triage",
        "component": null,
        "description": "",
        "release_codename": "resolute"
      },
      {
        "pocket": "security",
        "status": "needs-triage",
        "component": null,
        "description": "",
        "release_codename": "upstream"
      },
      {
        "pocket": "security",
        "status": "ignored",
        "component": null,
        "description": "end of life, was needs-triage",
        "release_codename": "questing"
      },
      {
        "pocket": "security",
        "status": "needs-triage",
        "component": null,
        "description": "",
        "release_codename": "stonking"
      }
    ]
  }
]
Archived source JSON

Correction evidence

Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.

No correction has been verified in the connected records. This does not mean the system is secure or that no vendor correction exists.

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history