6.1
MEDIUM CVSS 3.1
CVE-2018-3741
FasterXML Ruby Rails-HTML-Sanitizer Cross-Site Scripting
Description

There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby. The gem allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments, and these attributes can lead to an XSS attack on target applications. This issue is similar to CVE-2018-8048 in Loofah. All users running an affected release should either upgrade or use one of the workarounds immediately.

INFO

Published Date :

March 30, 2018, 7:29 p.m.

Last Modified :

Nov. 21, 2024, 4:05 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2018-3741 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Rubyonrails rails_html_sanitizers
2 Rubyonrails html_sanitizer
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 MEDIUM [email protected]
CVSS 3.1 MEDIUM [email protected]
Solution
To address a cross-site scripting vulnerability, upgrade the rails-html-sanitizer gem.
  • Upgrade the rails-html-sanitizer gem to version 1.0.4 or later.
  • Update the affected packages.
Public PoC/Exploit Available at Github

CVE-2018-3741 has a 7 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2018-3741.

URL Resource
https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae Issue Tracking Patch Third Party Advisory
https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae Issue Tracking Patch Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2018-3741 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2018-3741 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Go Dockerfile JavaScript HTML CSS HCL

Updated: 3 months, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : Aug. 3, 2022, 7:11 p.m. This repo has been linked 61 different CVEs too.

None

Dockerfile Makefile Shell Go Smarty Open Policy Agent Mustache

Updated: 4 years, 5 months ago
0 stars 1 fork 1 watcher
Born at : Feb. 25, 2021, 9:59 a.m. This repo has been linked 61 different CVEs too.

None

Dockerfile Makefile

Updated: 3 years ago
1 stars 0 fork 0 watcher
Born at : Dec. 15, 2020, 7:02 p.m. This repo has been linked 61 different CVEs too.

None

Dockerfile Makefile Shell Go Smarty Open Policy Agent

Updated: 8 months, 2 weeks ago
1 stars 0 fork 0 watcher
Born at : Sept. 21, 2020, 7:37 a.m. This repo has been linked 61 different CVEs too.

None

Dockerfile Makefile Shell Go Smarty

Updated: 5 years, 2 months ago
0 stars 0 fork 0 watcher
Born at : June 6, 2020, 2:22 a.m. This repo has been linked 54 different CVEs too.

todoappnotes

Updated: 5 years, 9 months ago
0 stars 0 fork 0 watcher
Born at : Oct. 31, 2019, 4:38 a.m. This repo has been linked 2 different CVEs too.

A Simple and Comprehensive Vulnerability Scanner for Containers, Suitable for CI for Web

Python HTML CSS JavaScript

Updated: 1 year ago
0 stars 0 fork 0 watcher
Born at : Aug. 2, 2019, 8:26 a.m. This repo has been linked 51 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2018-3741 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2018-3741 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Modified Analysis by [email protected]

    Jan. 30, 2023

    Action Type Old Value New Value
    Removed CVSS V3 NIST AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • CVE Modified by [email protected]

    Oct. 09, 2019

    Action Type Old Value New Value
    Added CWE HackerOne CWE-79
  • Initial Analysis by [email protected]

    Apr. 23, 2018

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
    Added CVSS V3 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    Changed Reference Type https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae No Types Assigned https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae Issue Tracking, Patch, Third Party Advisory
    Added CWE CWE-79
    Added CPE Configuration OR *cpe:2.3:a:rubyonrails:html_sanitizer:*:*:*:*:*:ruby:*:* versions up to (including) 1.0.3
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 6.1
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 4.3
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.40 }} 0.09%

score

0.59650

percentile