Loading...
Skip to main content

CVE-2023-28120 — Possible XSS Security Vulnerability in...

MEDIUM

Possible XSS Security Vulnerability in SafeBuffer#bytesplice

Published March 15, 2023Updated January 10, 2025Source: osv

Summary

There is a vulnerability in ActiveSupport if the new bytesplice method is called on a SafeBuffer with untrusted user input. This vulnerability has been assigned the CVE identifier CVE-2023-28120. Versions Affected: All. Not affected: None Fixed Versions: 7.0.4.3, 6.1.7.3 # Impact ActiveSupport uses the SafeBuffer string subclass to tag strings as html_safe after they have been sanitized. When these strings are mutated, the tag is should be removed to mark them as no longer being html_safe. Ruby 3.2 introduced a new bytesplice method which ActiveSupport did not yet understand to be a mutation. Users on older versions of Ruby are likely unaffected. All users running an affected release and using bytesplice should either upgrade or use one of the workarounds immediately. # Workarounds Avoid calling bytesplice on a SafeBuffer (html_safe) string with untrusted user input.

Advisory Timeline

  • First published March 15, 2023 (1307 days ago).
  • Last revised January 10, 2025 — 667 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update activesupport to 6.1.7.3 or later
gem install activesupport -v 6.1.7.3
Bundler
Update activesupport to 7.0.4.3 or later
gem install activesupport -v 7.0.4.3

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
activesupport
rubygems
1.0.0, 1.0.1, 1.0.2, 1.0.3 (+406 more)6.1.7.3
activesupport
rubygems
7.0.0, 7.0.1, 7.0.2, 7.0.2.1 (+8 more)7.0.4.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Frequently Asked Questions

What is CVE-2023-28120?
Possible XSS Security Vulnerability in SafeBuffer#bytesplice This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
How do I check if my project is affected by CVE-2023-28120?
CVE-2023-28120 affects activesupport. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-28120 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.3

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-pj73-v5mw-pm9j

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies