Every CVE Search/ Get API key

CVE-2023-23913

rails-ujs vulnerable to DOM Based Cross-site Scripting contenteditable HTML Elements

6.3 MediumFix available

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.64%Up 0.6 points since Jan 9, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
CVE-2023-23913
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2023-1918 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
EUVD-2023-1918
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Updated
2026-11-03
GitHub AdvisoriesGHSA-xp5h-f8jf-rc8q 6.3

rails-ujs vulnerable to DOM Based Cross-site Scripting contenteditable HTML Elements

NOTE: rails-ujs is part of Rails/actionview since 5.1.0.

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

This vulnerability has been assigned the CVE identifier CVE-2023-23913.

Not affected: < 5.1.0 Versions Affected: >= 5.1.0 Fixed Versions: 6.1.7.3, 7.0.4.3

Impact If the specified malicious HTML clipboard content is provided to a contenteditable element, this could result in the arbitrary execution of javascript on the origin in question.

Releases The FIXED releases are available at the normal locations.

Workarounds We recommend that all users upgrade to one of the FIXED versions. In the meantime, users can attempt to mitigate this vulnerability by removing the contenteditable attribute from elements in pages that rails-ujs will interact with.

Patches To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • rails-ujs-data-method-contenteditable-6-1.patch - Patch for 6.1 series
  • rails-ujs-data-method-contenteditable-7-0.patch - Patch for 7.0 series

Please note that only the 7.0.Z and 6.1.Z series are supported at present, and 6.0.Z for severe vulnerabilities.

Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits We would like to thank ryotak 15 for reporting this!

  • rails-ujs-data-method-contenteditable-6-1.patch (8.5 KB)
  • rails-ujs-data-method-contenteditable-7-0.patch (8.5 KB)
  • rails-ujs-data-method-contenteditable-main.patch (8.9 KB)
Record
GHSA-xp5h-f8jf-rc8q
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-79
Updated
2026-11-02
NVD 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
CVE-2023-23913
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-79
Updated
2026-11-02
OSV 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
CVE-2023-23913
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVDEBIAN-CVE-2023-23913 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
DEBIAN-CVE-2023-23913
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Updated
2026-11-02
Show 6 moreShow less
OSVGHSA-xp5h-f8jf-rc8q 6.3

rails-ujs vulnerable to DOM Based Cross-site Scripting contenteditable HTML Elements

NOTE: rails-ujs is part of Rails/actionview since 5.1.0.

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

This vulnerability has been assigned the CVE identifier CVE-2023-23913.

Not affected: < 5.1.0 Versions Affected: >= 5.1.0 Fixed Versions: 6.1.7.3, 7.0.4.3

Impact If the specified malicious HTML clipboard content is provided to a contenteditable element, this could result in the arbitrary execution of javascript on the origin in question.

Releases The FIXED releases are available at the normal locations.

Workarounds We recommend that all users upgrade to one of the FIXED versions. In the meantime, users can attempt to mitigate this vulnerability by removing the contenteditable attribute from elements in pages that rails-ujs will interact with.

Patches To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • rails-ujs-data-method-contenteditable-6-1.patch - Patch for 6.1 series
  • rails-ujs-data-method-contenteditable-7-0.patch - Patch for 7.0 series

Please note that only the 7.0.Z and 6.1.Z series are supported at present, and 6.0.Z for severe vulnerabilities.

Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits We would like to thank ryotak 15 for reporting this!

  • rails-ujs-data-method-contenteditable-6-1.patch (8.5 KB)
  • rails-ujs-data-method-contenteditable-7-0.patch (8.5 KB)
  • rails-ujs-data-method-contenteditable-main.patch (8.9 KB)
Record
GHSA-xp5h-f8jf-rc8q
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-79
Updated
2026-11-02
OSVOESA-2024-1774 7.5

rubygem-actionview security update

Simple, battle-tested conventions and helpers for building web pages.

Security Fix(es):

A flaw was found in Rails. rails-ujs may allow an attacker to perform Cross-Site Scripting (XSS), which could lead to stolen information, phishing attacks, and other types of attacks.(CVE-2023-23913)

Record
OESA-2024-1774
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVOESA-2024-1775 7.5

rubygem-actionview security update

Simple, battle-tested conventions and helpers for building web pages.

Security Fix(es):

A flaw was found in Rails. rails-ujs may allow an attacker to perform Cross-Site Scripting (XSS), which could lead to stolen information, phishing attacks, and other types of attacks.(CVE-2023-23913)

Record
OESA-2024-1775
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVOESA-2024-1776 7.5

rubygem-actionview security update

Simple, battle-tested conventions and helpers for building web pages.

Security Fix(es):

A flaw was found in Rails. rails-ujs may allow an attacker to perform Cross-Site Scripting (XSS), which could lead to stolen information, phishing attacks, and other types of attacks.(CVE-2023-23913)

Record
OESA-2024-1776
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2023-23913 6.3

There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-remote or data-disable-with attribute.

Record
UBUNTU-CVE-2023-23913
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVSUSE-SU-2023:3813-1 No score

Security update for rubygem-actionview-5_1

This update for rubygem-actionview-5_1 fixes the following issues:

  • CVE-2023-23913: Fixed DOM Based Cross-site Scripting in rails-ujs (bsc#1209826).
Record
SUSE-SU-2023:3813-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
actionview
RubyGems
5.1.0 up to 6.1.7.3
6.1.7.3
actionview
RubyGems
7.0.0 up to 7.0.4.3
7.0.4.3
rails
Debian:12
before 2:6.1.7.3+dfsg-1
2:6.1.7.3+dfsg-1
rails
Debian:13
before 2:6.1.7.3+dfsg-1
2:6.1.7.3+dfsg-1
rails
Debian:14
before 2:6.1.7.3+dfsg-1
2:6.1.7.3+dfsg-1
rails
Debian:11
before 2:6.0.3.7+dfsg-2+deb11u2, plus listed versions
2:6.0.3.7+dfsg-22:6.0.3.7+dfsg-2+deb11u1
2:6.0.3.7+dfsg-2+deb11u2
actionview
RubyGems
5.1.0 up to 6.1.7.3, plus listed versions
5.1.15.1.25.1.2.rc15.1.35.1.3.rc1
Show 45 moreShow less
5.1.3.rc25.1.3.rc35.1.45.1.4.rc15.1.55.1.5.rc15.1.65.1.6.15.1.6.25.1.75.1.7.rc15.2.05.2.0.beta15.2.0.beta25.2.0.rc15.2.0.rc25.2.15.2.1.15.2.1.rc15.2.25.2.2.15.2.2.rc15.2.35.2.3.rc15.2.45.2.4.15.2.4.25.2.4.35.2.4.45.2.4.55.2.4.65.2.4.rc15.2.55.2.65.2.6.15.2.6.25.2.6.35.2.75.2.7.15.2.85.2.8.16.0.06.0.0.beta16.0.0.beta26.0.0.beta3
6.1.7.3
actionview
RubyGems
7.0.0 up to 7.0.4.3, plus listed versions
7.0.17.0.27.0.2.17.0.2.27.0.2.3
Show 6 moreShow less
7.0.2.47.0.37.0.3.17.0.47.0.4.17.0.4.2
7.0.4.3
rubygem-actionview
openEuler:20.03-LTS-SP4
before 5.2.4.4-2.oe2003sp4
5.2.4.4-2.oe2003sp4
rubygem-actionview
openEuler:22.03-LTS-SP1
before 6.1.4.1-2.oe2203sp1
6.1.4.1-2.oe2203sp1
Show 16 moreShow less
Affected packages
PackageAffectedFixed
rubygem-actionview
openEuler:22.03-LTS-SP3
before 6.1.4.1-2.oe2203sp3
6.1.4.1-2.oe2203sp3
rubygem-actionview-5_1
SUSE:Linux Enterprise High Availability Extension 15 SP1
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
SUSE:Linux Enterprise High Availability Extension 15 SP2
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
SUSE:Linux Enterprise High Availability Extension 15 SP3
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
SUSE:Linux Enterprise High Availability Extension 15 SP4
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
SUSE:Linux Enterprise High Availability Extension 15 SP5
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
openSUSE:Leap 15.4
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rubygem-actionview-5_1
openSUSE:Leap 15.5
before 5.1.4-150000.3.9.1
5.1.4-150000.3.9.1
rails
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
2:4.1.10-12:4.2.5-12:4.2.5.1-12:4.2.5.2-22:4.2.6-12:4.2.6-1ubuntu0.1~esm12:4.2.6-1ubuntu0.1~esm2
None known
rails
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
2:4.2.9-22:4.2.9-42:4.2.10-0ubuntu42:4.2.10-0ubuntu4+esm12:4.2.10-0ubuntu4+esm2
None known
rails
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
2:5.2.2.1+dfsg-1ubuntu12:5.2.3+dfsg-32:5.2.3+dfsg-3ubuntu0.1~esm1
None known
rails
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2:6.0.3.7+dfsg-22:6.1.4.1+dfsg-8ubuntu22:6.1.4.1+dfsg-8ubuntu2+esm1
None known
rails
Ubuntu:24.04:LTS
All versions, plus listed versions
2:6.1.7.3+dfsg-2build12:6.1.7.3+dfsg-3
None known
rails
Ubuntu:25.10
All versions, plus listed versions
2:6.1.7.3+dfsg-72:7.2.2.1+dfsg-7
None known
rails
Ubuntu:26.10
All versions, plus listed versions
2:7.2.3+dfsg-22:7.2.3.2+dfsg-2
None known
rails
Ubuntu:26.04:LTS
All versions, plus listed versions
2:7.2.2.1+dfsg-72:7.2.2.2+dfsg-22:7.2.3+dfsg-2
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2023-23913 is a medium vulnerability (CVSS 6.3) in Rails Rails-ujs, published April 14, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.64%, the 50th percentile. Fixed in actionview 6.1.7.3.

References

Show 14 moreShow less
This page doesn't list everything

Left out here: 55 versions. The JSON record has them.

MoveEnter Open