CVE-2026-33170
MEDIUM6.1EPSS 0.01%Rails Active Support has a possible XSS vulnerability in SafeBuffer#%
發布日:2026/3/23修改日:2026/5/13
描述
### Impact `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. ### Releases The fixed releases are available at the normal locations. ### Credit This issue was responsibly reported by @ch4n3-yoon
受影響套件(2)
- Debian/railsfrom 0
- RubyGems/activesupport>= 8.1.0.beta1, < 8.1.2.1
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| osv | CVSS 4.0 | — | 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 |
| osv | CVSS 3.1 | MEDIUM6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
參考連結(11)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2026-33170
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2026-33170
- PATCHhttps://github.com/rails/rails
- WEBhttps://github.com/rails/rails/commit/50d732af3b7c8aaf63cbcca0becbc00279b215b7
- WEBhttps://github.com/rails/rails/commit/6e8a81108001d58043de9e54a06fca58962fc2db
- WEBhttps://github.com/rails/rails/commit/c1ad0e8e1972032f3395853a5e99cea035035beb
- WEBhttps://github.com/rails/rails/releases/tag/v7.2.3.1
- WEBhttps://github.com/rails/rails/releases/tag/v8.0.4.1
- WEBhttps://github.com/rails/rails/releases/tag/v8.1.2.1
- WEBhttps://github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v
- WEBhttps://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2026-33170.yml