8000
Skip to content

Releases: flavorjones/loofah

2.25.2

Choose a tag to compare

@flavorjones flavorjones released this 15 Jul 19:58
2706d7e

2.25.2 / 2026-07-15

Security

  • Ensure Loofah::HTML5::Scrub.allowed_uri? recognizes numeric character references without semicolons (e.g. javascript&#58alert(1)), which browsers decode and execute, and rejects schemes split by them. See GHSA-5qhf-9phg-95m2. @flavorjones
  • Ensure Loofah::HTML5::Scrub.allowed_uri? recognizes the named character references 	 and 
, which CGI.unescapeHTML does not decode and browsers strip from URIs, and rejects schemes split by them (e.g. java	script:alert(1)). See GHSA-8whx-365g-h9vv. @flavorjones
  • Ensure that both href and xlink:href attributes on SVG elements like use are restricted to local (same-document) references. Previously only xlink:href was restricted, allowing the SVG 2 href attribute to reference external documents. See GHSA-9wjq-cp2p-hrgf. @flavorjones

Improved

  • Harden data: URI mediatype parsing in Loofah::HTML5::Scrub.allowed_uri?. The mediatype is now parsed following the WHATWG data: URL spec and RFC 2397 instead of simply being split on a colon. A data: URI with an omitted or malformed mediatype is now treated as text/plain and allowed, and one without the required comma is now rejected. #305 @flavorjones
  • Remove feed from the default set of allowed protocols. The feed URI scheme was never accepted as a standard protocol, and no major browser supports it. Removing it reduces the attack surface particularly for non-browser contexts. #304 @flavorjones
  • Remove a vestigial &#x70 alternative from Loofah::HTML5::SafeList::PROTOCOL_SEPARATOR. This appears to be an ancient typo dating back to pre-extraction Rails circa 2007. #305 @flavorjones

2.25.1

Choose a tag to compare

@flavorjones flavorjones released this 17 Mar 17:37
c895c8b

2.25.1 / 2026-03-17

2.25.0 / 2025-12-15

Choose a tag to compare

@flavorjones flavorjones released this 15 Dec 21:21
e65bddd

2.25.0 / 2025-12-15

  • Extract Loofah::HTML5::Scrub.allowed_uri? which operates on a string. Previously this logic was coupled to the parsed tree in .scrub_uri_attribute. #300 @flavorjones
  • Tightened up how entities and control characters are handled when detecting allowed URIs. #301 @flavorjones

Full Changelog: v2.24.1...v2.25.0

2.24.1 / 2025-05-12

Choose a tag to compare

@flavorjones flavorjones released this 12 May 12:32
6cadc8a

2.24.1 / 2025-05-12

Ruby support

  • Import only what's needed from cgi for support for Ruby 3.5 #296 @Earlopain

2.24.0 / 2024-12-24

Choose a tag to compare

@flavorjones flavorjones released this 01 Jan 03:07
8599060

2.24.0 / 2024-12-24

Added

Improved

  • Built-in scrubber :targetblank now skips a tags whose href attribute is an anchor link. Previously, all a tags were modified to have target='_blank'. #291 @fnando

New Contributors

Full Changelog: v2.23.1...v2.24.0

2.23.1 / 2024-10-25

Choose a tag to compare

@flavorjones flavorjones released this 25 Oct 12:45
3c09a93

2.23.1 / 2024-10-25

Added

  • Allow CSS properties min-height and max-height. [#288] @lazyatom

Full Changelog: v2.23.0...v2.23.1

2.23.0 / 2024-10-24

Choose a tag to compare

@flavorjones flavorjones released this 24 Oct 13:00
5ac17a8

2.23.0 / 2024-10-24

Added

New Contributors

Full Changelog: v2.22.0...v2.23.0

2.22.0 / 2023-11-13

Choose a tag to compare

@flavorjones flavorjones released this 13 Nov 21:42
cb14ea7

2.22.0 / 2023-11-13

Added

  • A :targetblank HTML scrubber which ensures all hyperlinks have target="_blank". [#275] @stefannibrasil and @thdaraujo
  • A :noreferrer HTML scrubber which ensures all hyperlinks have rel=noreferrer, similar to the :nofollow and :noopener scrubbers. [#277] @wynksaiddestroy

2.21.4 / 2023-10-10

Choose a tag to compare

@flavorjones flavorjones released this 10 Oct 17:56
992b054

2.21.4 / 2023-10-10

Fixed

  • Loofah::HTML5::Scrub.scrub_css is more consistent in preserving whitespace (and lack of whitespace) in CSS property values. In particular, .scrub_css no longer inserts whitespace between tokens that did not already have whitespace between them. [#273, fixes #271]

2.21.3 / 2023-05-15

Choose a tag to compare

@flavorjones flavorjones released this 15 May 21:11
e34118a

2.21.3 / 2023-05-15

  • Quash "instance variable not initialized" warning in Ruby < 3.0. [#268] (Thanks, @dharamgollapudi!)
0