All reports
Medium

Cross-site Scripting in loofah

Affected versions

RubyGemsloofah
Affected versions
< 2.2.1
Fixed version
2.2.1
RubyGemsnokogiri
Affected versions
< 1.8.3
Fixed version
1.8.3

Exploitation

CVE-2018-8048

Probability of exploitation in the next 30 days: 1.93%

FIRST EPSS · 2026-11-19

Description

Loofah allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments.

Users are affected if running Loofah < 2.2.1, but only:

  • when running on MRI or RBX,

  • in combination with libxml2 >= 2.9.2.

JRuby users are not affected.

Links

Credits

  • tdunlap607