CVE-2023-28120 Possible XSS Security Vulnerability in SafeBuffer#bytesplice

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
activesupport RubyGemsAll versions6.1.7.3
activesupport RubyGemsAll versions6.1.7.3
activesupport RubyGemsFrom 7.0.07.0.4.3
activesupport RubyGemsFrom 7.0.07.0.4.3
Linux distribution packages (1)
rubygem-activesupport-7.0 openSUSE:TumbleweedAll versions7.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.

Is CVE-2023-28120 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free