# CVE-2026-33170: Rails Active Support has a possible XSS vulnerability in SafeBuffer\#%

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-03-23 · Modified: 2026-03-25
- Aliases: UBUNTU-CVE-2026-33170, DEBIAN-CVE-2026-33170, CGA-2g8x-wc5h-m8x7, CGA-3c9r-c3vv-c5c6, CGA-638j-r3g3-7cqp, CGA-843m-wh9f-3mvv, CGA-99vg-vgg4-gfqq, CGA-fh24-5rxr-62vm, CGA-jrc2-494v-4w4c, CGA-mc26-qw9h-wmqv, CGA-2774-4p8f-789g, CGA-2c8h-7mrc-qc9r, CGA-2jj4-42w7-h2jr, CGA-2x27-732m-gvpj, CGA-35ph-p532-gmrc, CGA-3p33-25w2-w6xh, CGA-46f6-vccg-mhj6, CGA-4gfr-rhvc-3379, CGA-4x4h-9jcg-jccw, CGA-4xxx-72v8-m65x, CGA-55fg-w269-8qp9, CGA-5fc9-2hh9-7hf5, CGA-5vj3-h385-74g4, CGA-5www-54qf-x6pc, CGA-6h6m-c49q-j78c, CGA-6xf5-vm69-rcc9, CGA-7gx5-3432-286m, CGA-87jj-c63c-c297, CGA-8pwg-r95p-cxrm, CGA-8v7g-3p98-q62f, CGA-9hwq-m32j-vjcj, CGA-9wh2-rrjp-75xw, CGA-c8hg-fm4p-6j8f, CGA-cqfr-9gcp-p46g, CGA-crp4-3jxm-7wgh, CGA-cvcf-2grv-r7p6, CGA-f24h-j53c-w9mj, CGA-f2cm-8438-g439, CGA-f6w9-m6x5-pj42, CGA-fr2p-f467-v57w, CGA-g236-7h42-45f8, CGA-g3pw-ffh2-r86h, CGA-hff9-322r-qrjh, CGA-j9xm-vv8q-rp7j, CGA-m3m6-wxc3-gmj8, CGA-m97m-885m-chvv, CGA-mmm5-hcx4-x8mm, CGA-p6vp-p9f5-29h4, CGA-prr8-49cm-hrwq, GHSA-89vf-4333-qx8v, CGA-q72x-5c5g-5h4v, CGA-qpgj-rr9f-h78j, CGA-qrj8-5pcv-7565, CGA-qvp2-2m79-555h, CGA-r3wr-w9g8-f375, CGA-rg4x-w9fh-m58g, CGA-vf59-m8fm-frhv, CGA-w3mx-4j9h-fgp5, CGA-w86c-x436-7w7h, CGA-xjg6-8p2v-66xc, CGA-xmw2-47cg-2pm3
- Record: https://cvemate.com/vulnerability/CVE-2026-33170 · JSON: https://cvemate.com/vulnerability/CVE-2026-33170/json

## Description

```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.
```

## Signals

- CVSS: 6.1 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.381%, percentile 34.285%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 38)

- chainguard cinc-auditor (Chainguard): \< 7.0.107-r1
- chainguard gitlab-rails-ce-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.10 (Chainguard): \< 18.10.3-r1
- chainguard gitlab-rails-ce-18.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.3 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): \< 18.8.11-r4
- chainguard gitlab-rails-ce-18.9 (Chainguard): \< 18.9.5-r0
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.10 (Chainguard): \< 18.10.3-r0
- chainguard gitlab-rails-ce-fips-18.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.3 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)

## References

- <https://github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v>
- <https://github.com/rails/rails/commit/50d732af3b7c8aaf63cbcca0becbc00279b215b7>
- <https://github.com/rails/rails/commit/6e8a81108001d58043de9e54a06fca58962fc2db>
- <https://github.com/rails/rails/commit/c1ad0e8e1972032f3395853a5e99cea035035beb>
- <https://github.com/rails/rails/releases/tag/v7.2.3.1>
- <https://github.com/rails/rails/releases/tag/v8.0.4.1>
- <https://github.com/rails/rails/releases/tag/v8.1.2.1>
- <https://ubuntu.com/security/CVE-2026-33170>
- <https://www.cve.org/CVERecord?id=CVE-2026-33170>
- <https://security-tracker.debian.org/tracker/CVE-2026-33170>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33170.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-33170>
- <https://github.com/rails/rails>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2026-33170.yml>

---

Data as of 2026-12-05T05:17:59.261Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
