Skip to content

Commit 3a285a3

Browse files
Add CVE-2023-28120 for ActiveSupport (#549)
1 parent dfd23e9 commit 3a285a3

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
gem: activesupport
3+
framework: rails
4+
cve: 2023-28120
5+
url: https://discuss.rubyonrails.org/t/cve-2023-28120-possible-xss-security-vulnerability-in-safebuffer-bytesplice/82469
6+
title: Possible XSS Security Vulnerability in SafeBuffer#bytesplice
7+
date: 2023-03-13
8+
description: |
9+
There is a vulnerability in ActiveSupport if the new bytesplice method is called on a SafeBuffer with untrusted user input.
10+
This vulnerability has been assigned the CVE identifier CVE-2023-28120.
11+
12+
Versions Affected: All. Not affected: None Fixed Versions: 7.0.4.3, 6.1.7.3
13+
14+
# Impact
15+
16+
ActiveSupport uses the SafeBuffer string subclass to tag strings as html_safe after they have been sanitized.
17+
When these strings are mutated, the tag is should be removed to mark them as no longer being html_safe.
18+
19+
Ruby 3.2 introduced a new bytesplice method which ActiveSupport did not yet understand to be a mutation.
20+
Users on older versions of Ruby are likely unaffected.
21+
22+
All users running an affected release and using bytesplice should either upgrade or use one of the workarounds immediately.
23+
24+
# Workarounds
25+
26+
Avoid calling bytesplice on a SafeBuffer (html_safe) string with untrusted user input.
27+
patched_versions:
28+
- "~> 6.1.7, >= 6.1.7.3"
29+
- ">= 7.0.4.3"

0 commit comments

Comments
 (0)