{"id":"CVE-2026-33170","aliases":["CVE-2026-33170","GHSA-89vf-4333-qx8v"],"related":[],"kind":"vulnerability","state":"published","title":"Rails Active Support has a possible XSS vulnerability in SafeBuffer#%","summary":"Active Support is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, `SafeBuffer#%` does not propagate the `@html_unsafe` flag to the newly created buffer. If a `SafeBuffer` is mutated in place (e.g. via `gsub!`) and then formatted with `%` using untrusted arguments, the result incorrectly reports `html_safe? == true`, bypassing ERB auto-escaping and possibly leading to XSS. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Active Support is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, `SafeBuffer#%` does not propagate the `@html_unsafe` flag to the newly created buffer. If a `SafeBuffer` is mutated in place (e.g. via `gsub!`) and then formatted with `%` using untrusted arguments, the result incorrectly reports `html_safe? == true`, bypassing ERB auto-escaping and possibly leading to XSS. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.","source":"cvelist"},{"lang":"en","text":"### Impact\n`SafeBuffer#%` does not propagate the `@html_unsafe` flag to the newly created buffer. If a `SafeBuffer` is mutated in place (e.g. via `gsub!`) and then formatted with `%` using untrusted arguments, the result incorrectly reports `html_safe? == true`, bypassing ERB auto-escaping and possibly leading to XSS.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\n### Credit\nThis issue was responsibly reported by @ch4n3-yoon","format":"markdown","source":"ghsa"},{"lang":"es","text":"Active Support es un conjunto de herramientas de bibliotecas de soporte y extensiones del núcleo de Ruby extraídas del framework de Rails. Antes de las versiones 8.1.2.1, 8.0.4.1 y 7.2.3.1, 'SafeBuffer#%' no propaga el flag '@html_unsafe' al búfer recién creado. Si un 'SafeBuffer' es mutado in situ (p. ej., a través de 'gsub!') y luego formateado con '%' usando argumentos no confiables, el resultado informa incorrectamente que 'html_safe? == true', omitiendo el auto-escapado de ERB y posiblemente llevando a XSS. Las versiones 8.1.2.1, 8.0.4.1 y 7.2.3.1 contienen un parche.","source":"nvd"}],"published":"2026-03-23T20:53:28.000Z","modified":"2026-09-10T03:50:38.175Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 8.1.0.beta1, < 8.1.2.1","status":"affected"},{"version":">= 8.0.0.beta1, < 8.0.4.1","status":"affected"},{"version":"< 7.2.3.1","status":"affected"}],"vendor":"rails","product":"activesupport","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"8.1.0.beta1","status":"affected","fixed":"8.1.2.1"}],"ecosystem":"RubyGems","package":"activesupport","purl":"pkg:gem/activesupport","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0.beta1","status":"affected","fixed":"8.0.4.1"}],"ecosystem":"RubyGems","package":"activesupport","purl":"pkg:gem/activesupport","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"7.2.3.1"}],"ecosystem":"RubyGems","package":"activesupport","purl":"pkg:gem/activesupport","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.2.3.1"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.4.1"},{"status":"affected","introduced":"8.1.0","fixed":"8.1.2.1"}],"vendor":"rubyonrails","product":"rails","cpe":"cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/50d732af3b7c8aaf63cbcca0becbc00279b215b7","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/6e8a81108001d58043de9e54a06fca58962fc2db","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/c1ad0e8e1972032f3395853a5e99cea035035beb","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/releases/tag/v7.2.3.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/releases/tag/v8.0.4.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/releases/tag/v8.1.2.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33170","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2026-33170.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-25T19:20:16.086Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33170","url":"https://www.cve.org/CVERecord?id=CVE-2026-33170","licence":"CVE Terms of Use","modified":"2026-03-25T19:20:28.280Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-89vf-4333-qx8v","url":"https://github.com/advisories/GHSA-89vf-4333-qx8v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:38.175Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33170","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33170","licence":"Public domain","modified":"2026-06-17T10:37:04.360Z"}],"updatedAt":"2026-11-25T22:59:16.508Z","epss":{"score":0.00381,"percentile":0.34283,"date":"2026-12-01T12:00:22.000Z"}}