CVE-2023-28120 Possible XSS Security Vulnerability in SafeBuffer#bytesplice
Attackers can execute arbitrary scripts via XSS in Rails ActiveSupport when using the bytesplice method on SafeBuffer with untrusted input.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-28120?
CVE-2023-28120 is a medium-severity cross-site scripting vulnerability in Rails ActiveSupport, published on 9 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
There is a vulnerability in ActiveSupport if the new bytesplice method is called on a SafeBuffer with untrusted user input.
Weakness: CWE-79
Which versions are affected by CVE-2023-28120?
4 open source packages ship an affected version, including activesupport.
| Package | Affected | Fixed in |
|---|---|---|
activesupport RubyGems | All versions | 6.1.7.3 |
activesupport RubyGems | All versions | 6.1.7.3 |
activesupport RubyGems | From 7.0.0 | 7.0.4.3 |
activesupport RubyGems | From 7.0.0 | 7.0.4.3 |
Linux distribution packages (1)
rubygem-activesupport-7.0 openSUSE:Tumbleweed | All versions | 7.0.4.3-1.1 |
How do I fix CVE-2023-28120?
Upgrade activesupport to a fixed version for your release line: 6.1.7.3 or 7.0.4.3.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-28120 being exploited?
There is no known exploitation of CVE-2023-28120 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2023-28120, GHSA-pj73-v5mw-pm9j, OESA-2024-1797, OESA-2024-1798, OESA-2024-1799, OESA-2024-1800 and 2 more.