PT-2018-2635 · Ruby · Sanitize

Published

2018-03-21

·

Updated

2018-12-28

·

CVE-2018-3740

CVSS v3.1

7.5

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Name of the Vulnerable Software and Affected Versions Sanitize gem for Ruby versions prior to 4.6.3
Description The issue is related to errors in input data checking in the Sanitize library for Ruby. It can be exploited by a remote attacker to bypass restrictions on the use of HTML attributes, allowing non-whitelisted attributes to be used on whitelisted HTML elements. This can lead to HTML and JavaScript injection, potentially resulting in cross-site scripting (XSS) if the output is served to browsers.
Recommendations For Sanitize gem for Ruby versions prior to 4.6.3, update to version 4.6.3 or later to resolve the issue. As a temporary workaround, consider restricting the use of the Sanitize gem until a patch is available.

Exploit

Fix

RCE

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2019-01252
CVE-2018-3740
DSA-4358-1
GHSA-7F42-P84J-F58P

Affected Products

Sanitize