CVE-2023-23913: Actionview Cross-Site Scripting Vulnerability
MODERATECVE-2023-23913 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Actionview libraries in the RubyGems ecosystem. The issue involves rails-ujs vulnerable to dom based cross-site scripting contenteditable html elements. Remediation is available by upgrading affected packages to version 6.1.7.3, 7.0.4.3.
CVE-2023-23913 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2023-23913
To remediate this vulnerability, upgrade all affected Actionview dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade actionview to 6.1.7.3
Upgrade actionview to 7.0.4.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionview
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-23913, inspect your project dependencies for Actionview:
inspect dependencies for actionview
Analyze the terminal output to locate any version of Actionview in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.1.7.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Actionview, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-23913 Affected Actionview Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionview
|
RubyGems |
≥ 5.1.0
< 6.1.7.3
|
6.1.7.3
|
|
actionview
|
RubyGems |
≥ 7.0.0
< 7.0.4.3
|
7.0.4.3
|
References
Frequently Asked Questions
What is CVE-2023-23913?
Which Actionview versions are affected?
What version fixes CVE-2023-23913?
Is actionview affected?
What is the CVSS score of CVE-2023-23913?
What CWE is associated with CVE-2023-23913?
How can I check RubyGems dependencies for CVE-2023-23913?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xp5h-f8jf-rc8q",
"modified" : "2025-01-09T18:57:25Z",
"published" : "2023-06-09T22:41:16Z",
"aliases" : [ "CVE-2023-23913" ],
"summary" : "rails-ujs vulnerable to DOM Based Cross-site Scripting contenteditable HTML Elements",
"details" : "NOTE: rails-ujs is part of Rails/actionview since 5.1.0.\n\nThere is a potential DOM based cross-site scripting issue in rails-ujs\nwhich leverages the Clipboard API to target HTML elements that are\nassigned the contenteditable attribute. This has the potential to\noccur when pasting malicious HTML content from the clipboard that\nincludes a data-method, data-remote or data-disable-with attribute.\n\nThis vulnerability has been assigned the CVE identifier CVE-2023-23913.\n\nNot affected: < 5.1.0\nVersions Affected: >= 5.1.0\nFixed Versions: 6.1.7.3, 7.0.4.3\n\nImpact\n If the specified malicious HTML clipboard content is provided to a\n contenteditable element, this could result in the arbitrary execution\n of javascript on the origin in question.\n\nReleases\n The FIXED releases are available at the normal locations.\n\nWorkarounds\n We recommend that all users upgrade to one of the FIXED versions.\n In the meantime, users can attempt to mitigate this vulnerability\n by removing the contenteditable attribute from elements in pages\n that rails-ujs will interact with.\n\nPatches\n To aid users who aren’t able to upgrade immediately we have provided\n patches for the two supported release series. They are in git-am\n format and consist of a single changeset.\n\n* rails-ujs-data-method-contenteditable-6-1.patch - Patch for 6.1 series\n* rails-ujs-data-method-contenteditable-7-0.patch - Patch for 7.0 series\n\nPlease note that only the 7.0.Z and 6.1.Z series are\nsupported at present, and 6.0.Z for severe vulnerabilities.\n\nUsers of earlier unsupported releases are advised to upgrade as\nsoon as possible as we cannot guarantee the continued availability\nof security fixes for unsupported releases.\n\nCredits\n We would like to thank ryotak 15 for reporting this!\n\n* rails-ujs-data-method-contenteditable-6-1.patch (8.5 KB)\n* rails-ujs-data-method-contenteditable-7-0.patch (8.5 KB)\n* rails-ujs-data-method-contenteditable-main.patch (8.9 KB)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0"
}, {
"fixed" : "6.1.7.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.0.4.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-23913"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/5037a13614d71727af8a175063bcf6ba1a74bdbd"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/73009ea59a811b28e8ec2a9c9bc24635aa891214"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033263"
}, {
"type" : "WEB",
"url" : "https://discuss.rubyonrails.org/t/cve-2023-23913-dom-based-cross-site-scripting-in-rails-ujs-for-contenteditable-html-elements/82468"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2023-23913.yml"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240605-0007"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2023/dsa-5389"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-09T22:41:16Z",
"nvd_published_at" : "2025-01-09T01:15:07Z"
}
}