Skip to content

chore(deps): bump loofah from 2.22.0 to 2.25.3 in /samples/rails/app - #790

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/bundler/samples/rails/app/loofah-2.25.3
Nov 12, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
dependabot/bundler/samples/rails/app/loofah-2.25.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Bumps loofah from 2.22.0 to 2.25.3.

Release notes

Sourced from loofah's releases.

2.25.3 / 2026-11-01

Security

  • Ensure Loofah::HTML5::Scrub.allowed_uri? rejects schemes split by a numeric character reference without a semicolon that ends at a character allowed_uri? strips (e.g. javascript&#x3a alert(1)) or at another character reference (e.g. javascript&#x3aalert(1)). Character references are now decoded before anything is stripped, as browsers do. See GHSA-p9wj-w8xq-vjx6. @​flavorjones
  • Ensure Loofah::HTML5::Scrub.allowed_uri? recognizes the named character reference &sol;, which CGI.unescapeHTML does not decode and browsers read as /, and rejects data: URIs that disguise a disallowed mediatype with it (e.g. data:text&sol;html,<script>alert(1)</script>). Previously that mediatype was treated as malformed and fell back to the allowed text/plain. Only v2.25.2 is affected. See GHSA-jcff-cj73-4w4f. @​flavorjones
  • Ensure Loofah::HTML5::Scrub.scrub_css does not decode CSS escapes in identifiers. Previously, escaped parentheses (e.g. url\28 http://example.com/\29) came out as a live url(), which could make the viewer's browser fetch an attacker-chosen URL. See GHSA-m3x9-938q-5767. @​flavorjones
  • Ensure that href and xlink:href on SVG textPath and mpath elements are restricted to local (same-document) references. Previously SVG_ALLOW_LOCAL_HREF spelled textPath in lowercase, which never matched the name the HTML5 parser assigns inside <svg>, and omitted mpath entirely. See GHSA-345x-3rq2-jfrm. @​flavorjones
  • Fix quadratic-time scrubbing of the href and xlink:href attributes of SVG elements. Only Ruby 3.1 and earlier are affected, because Ruby 3.2 introduced linear-time regexp matching. See GHSA-mf2j-8f84-cc9q. @​flavorjones
  • Ensure HTML5 scrubber output does not turn into new markup when a browser parses it again. The fix is in Nokogiri v1.19.5, which escapes < and > in attribute values as the HTML standard requires, so Loofah now requires Nokogiri >= 1.19.5. See GHSA-h6v6-rg66-fqj4. @​flavorjones @​hackvertor

Dependencies

  • Loofah now requires Ruby >= 3.2, the minimum that Nokogiri v1.19.x supports. We don't like dropping Ruby versions in a patch release, and we're sorry for the inconvenience, but it's the only way to make sure everyone gets the security fix in GHSA-h6v6-rg66-fqj4.

Added

  • Loofah::HTML5::Scrub.prefixed_attribute_name and Loofah::HTML5::Scrub.scrub_attribute_value expose the html5lib attribute name and value rules, so downstream consumers can apply them instead of carrying their own copy. @​flavorjones

Fixed

  • Fix :double_breakpoint, which left document fragments unchanged despite its documented example. The scrubber now changes only paragraphs inside the scrubbed node, and its run time on a document grows linearly, not quadratically, with the paragraph count. #309 @​OskarEichler
  • Fix :whitewash, which passed CDATA sections through unchanged. Markup inside a CDATA section in Loofah.xml_fragment or Loofah.xml_document survived scrubbing and became live elements if the output was later parsed as HTML. The scrubber now escapes CDATA content, as :strip, :prune and :escape already do. On JRuby, every sanitizer now emits escaped CDATA content as a CDATA section, as on CRuby, instead of a text node that double-escaped it. #313 @​flavorjones (reported by @​MegaManSec)
  • Fix :double_breakpoint, which raised NoMethodError on a paragraph that ends with a <br> after a double break. #314 @​flavorjones (reported by @​MegaManSec)
  • Fix Loofah::HTML5::Scrub.allowed_uri?, which raised Encoding::CompatibilityError on a string in an encoding other than UTF-8 and ArgumentError on invalid UTF-8. It now transcodes the input to UTF-8 and returns false when the input has an invalid byte sequence or no UTF-8 representation. #315 @​flavorjones

New Contributors

Full Changelog: flavorjones/loofah@v2.25.2...v2.25.3

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 &Tab; and &NewLine;, which CGI.unescapeHTML does not decode and browsers strip from URIs, and rejects schemes split by them (e.g. java&Tab;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 / 2026-03-17

... (truncated)

Changelog

Sourced from loofah's changelog.

2.25.3 / 2026-11-01

Security

  • Ensure Loofah::HTML5::Scrub.allowed_uri? rejects schemes split by a numeric character reference without a semicolon that ends at a character allowed_uri? strips (e.g. javascript&#x3a alert(1)) or at another character reference (e.g. javascript&#x3a&#x61;lert(1)). Character references are now decoded before anything is stripped, as browsers do. See GHSA-p9wj-w8xq-vjx6. @​flavorjones
  • Ensure Loofah::HTML5::Scrub.allowed_uri? recognizes the named character reference &sol;, which CGI.unescapeHTML does not decode and browsers read as /, and rejects data: URIs that disguise a disallowed mediatype with it (e.g. data:text&sol;html,<script>alert(1)</script>). Previously that mediatype was treated as malformed and fell back to the allowed text/plain. Only v2.25.2 is affected. See GHSA-jcff-cj73-4w4f. @​flavorjones
  • Ensure Loofah::HTML5::Scrub.scrub_css does not decode CSS escapes in identifiers. Previously, escaped parentheses (e.g. url\28 http://example.com/\29) came out as a live url(), which could make the viewer's browser fetch an attacker-chosen URL. See GHSA-m3x9-938q-5767. @​flavorjones
  • Ensure that href and xlink:href on SVG textPath and mpath elements are restricted to local (same-document) references. Previously SVG_ALLOW_LOCAL_HREF spelled textPath in lowercase, which never matched the name the HTML5 parser assigns inside <svg>, and omitted mpath entirely. See GHSA-345x-3rq2-jfrm. @​flavorjones
  • Fix quadratic-time scrubbing of the href and xlink:href attributes of SVG elements. Only Ruby 3.1 and earlier are affected, because Ruby 3.2 introduced linear-time regexp matching. See GHSA-mf2j-8f84-cc9q. @​flavorjones
  • Ensure HTML5 scrubber output does not turn into new markup when a browser parses it again. The fix is in Nokogiri v1.19.5, which escapes < and > in attribute values as the HTML standard requires, so Loofah now requires Nokogiri >= 1.19.5. See GHSA-h6v6-rg66-fqj4. @​flavorjones @​hackvertor

Dependencies

  • Loofah now requires Ruby >= 3.2, the minimum that Nokogiri v1.19.x supports. We don't like dropping Ruby versions in a patch release, and we're sorry for the inconvenience, but it's the only way to make sure everyone gets the security fix in GHSA-h6v6-rg66-fqj4.

Added

  • Loofah::HTML5::Scrub.prefixed_attribute_name and Loofah::HTML5::Scrub.scrub_attribute_value expose the html5lib attribute name and value rules, so downstream consumers can apply them instead of carrying their own copy. @​flavorjones

Fixed

  • Fix :double_breakpoint, which left document fragments unchanged despite its documented example. The scrubber now changes only paragraphs inside the scrubbed node, and its run time on a document grows linearly, not quadratically, with the paragraph count. #309 @​OskarEichler
  • Fix :whitewash, which passed CDATA sections through unchanged. Markup inside a CDATA section in Loofah.xml_fragment or Loofah.xml_document survived scrubbing and became live elements if the output was later parsed as HTML. The scrubber now escapes CDATA content, as :strip, :prune and :escape already do. On JRuby, every sanitizer now emits escaped CDATA content as a CDATA section, as on CRuby, instead of a text node that double-escaped it. #313 @​flavorjones (reported by @​MegaManSec)
  • Fix :double_breakpoint, which raised NoMethodError on a paragraph that ends with a <br> after a double break. #314 @​flavorjones (reported by @​MegaManSec)
  • Fix Loofah::HTML5::Scrub.allowed_uri?, which raised Encoding::CompatibilityError on a string in an encoding other than UTF-8 and ArgumentError on invalid UTF-8. It now transcodes the input to UTF-8 and returns false when the input has an invalid byte sequence or no UTF-8 representation. #315 @​flavorjones

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 &Tab; and &NewLine;, which CGI.unescapeHTML does not decode and browsers strip from URIs, and rejects schemes split by them (e.g. java&Tab;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 / 2026-03-17

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

... (truncated)

Commits
  • bbe007e version bump to v2.25.3
  • a390863 Merge pull request #324 from flavorjones/card-933-release-v2-25-3
  • 7f20aba doc: fix up CHANGELOG
  • 30924ba build: require Ruby >= 3.2
  • 7ba1e7b fix: require Nokogiri >= 1.19.5 to prevent mXSS in HTML5 scrubbers
  • 41c681b doc: fix up CHANGELOG
  • 5431ea9 doc: update CHANGELOG
  • 62c0484 fix: allowed_uri? bypass via a stripped reference terminator
  • ad92002 Update allowed_uri? to handle the named solidus character reference
  • d3ae9eb doc: update CHANGELOG
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.
## Samples Checklist ✅ All good!

Bumps [loofah](https://github.com/flavorjones/loofah) from 2.22.0 to 2.25.3.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](flavorjones/loofah@v2.22.0...v2.25.3)

---
updated-dependencies:
- dependency-name: loofah
  dependency-version: 2.25.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Nov 12, 2026
@dependabot
dependabot Bot deployed to deploy-changed-samples November 12, 2026 21:31 Active
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7fdda91a-bd9b-4f83-b1c0-8df0c149c8d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions
github-actions Bot merged commit 484eaf9 into main Nov 12, 2026
5 checks passed
@dependabot
dependabot Bot deleted the dependabot/bundler/samples/rails/app/loofah-2.25.3 branch November 12, 2026 21:32

This branch was successfully deployed

1 active deployment
deploy-changed-samples — 2123f477 Deployed Nov 12, 2026 by dependabot[bot] via deploy_changed_samples #934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants