Skip to content

chore(deps): bump rails-html-sanitizer to 1.7.1 and json to 2.20.0 - #131

Merged
philippemnoel merged 1 commit into
mainfrom
fix/dependabot-rails-html-sanitizer-json
Jul 26, 2026
Merged

chore(deps): bump rails-html-sanitizer to 1.7.1 and json to 2.20.0#131
philippemnoel merged 1 commit into
mainfrom
fix/dependabot-rails-html-sanitizer-json

Conversation

@philippemnoel

Copy link
Copy Markdown
Member

Resolves all three open Dependabot alerts.

File Gem Before After
Gemfile.lock rails-html-sanitizer 1.7.0 1.7.1
examples/Gemfile.lock rails-html-sanitizer 1.7.0 1.7.1
examples/Gemfile.lock json 2.19.7 2.20.0
gemfiles/rails72.gemfile.lock rails-html-sanitizer 1.6.2 1.7.1
gemfiles/rails72.gemfile.lock loofah 2.25.0 2.25.2

Advisories addressed:

  • rails-html-sanitizer >= 1.0.3, < 1.7.1 — possible XSS vulnerability with certain configurations (medium).
  • json >= 2.9.0, < 2.19.9 — JSON generator heap buffer overflow when streaming to an IO (low). The root Gemfile.lock was already on 2.20.0, so only the examples lock needed this.

Notes

gemfiles/rails72.gemfile.lock was not in the alert list — Dependabot only scans Gemfile.lock and examples/Gemfile.lock — but it carried the same rails-html-sanitizer advisory at 1.6.2, so it is bumped here too. That pulls loofah to 2.25.2 in that lock, since rails-html-sanitizer 1.7.1 requires loofah ~> 2.25, >= 2.25.2.

No changelog entry: these lockfiles are dev/CI-only. The gemspec declares unpinned runtime ranges (activerecord, activesupport, pg, railties), so gem consumers resolve their own transitive versions and see no behavior change. This matches how #128 / #129 were handled.

Lockfiles were hand-edited rather than regenerated (no Ruby 4.0 toolchain available locally). All four sha256 CHECKSUMS entries were verified by downloading the gems and hashing them, and every dependency requirement across all three locks was checked against the locked versions. Relying on CI here to confirm the resolution installs and the suites pass on both Rails 7.2 and 8.1.

https://claude.ai/code/session_01UW2w6koy14hxCEfHcYH8GJ

Resolves the open Dependabot alerts:

- rails-html-sanitizer < 1.7.1: possible XSS with certain configurations
  (Gemfile.lock, examples/Gemfile.lock)
- json >= 2.9.0, < 2.19.9: JSON generator heap buffer overflow when
  streaming to an IO (examples/Gemfile.lock)

Also bumps rails-html-sanitizer in gemfiles/rails72.gemfile.lock, which
carried the same advisory at 1.6.2 but is outside the paths Dependabot
scans. That pulls loofah to 2.25.2 there, since rails-html-sanitizer
1.7.1 requires loofah ~> 2.25, >= 2.25.2.

Claude-Session: https://claude.ai/code/session_01UW2w6koy14hxCEfHcYH8GJ
@philippemnoel
philippemnoel merged commit 69d112c into main Jul 26, 2026
12 checks passed
@philippemnoel
philippemnoel deleted the fix/dependabot-rails-html-sanitizer-json branch July 26, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant