Skip to content

Bump nokogiri to 1.19.3 to patch libxml2 CVEs#29

Merged
ceritium merged 5 commits into
masterfrom
fix/nokogiri-1.18.9-security
May 10, 2026
Merged

Bump nokogiri to 1.19.3 to patch libxml2 CVEs#29
ceritium merged 5 commits into
masterfrom
fix/nokogiri-1.18.9-security

Conversation

@ceritium
Copy link
Copy Markdown
Owner

Addresses GHSA-353f-x4gh-cqq8 (Dependabot alert #44): nokogiri < 1.18.9 ships a vulnerable vendored libxml2 affected by CVE-2025-49794/49795/49796 (critical), CVE-2025-6021 (high), and CVE-2025-6170 (low).

ceritium and others added 5 commits May 10, 2026 16:45
Addresses GHSA-353f-x4gh-cqq8 (Dependabot alert #44): nokogiri < 1.18.9
ships a vulnerable vendored libxml2 affected by CVE-2025-49794/49795/49796
(critical), CVE-2025-6021 (high), and CVE-2025-6170 (low).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nokogiri >= 1.18.9 (the minimum version with the libxml2 CVE patches
from GHSA-353f-x4gh-cqq8) requires Ruby >= 3.1, so the previous CI
matrix (2.7, 3.0.3) cannot install it. Update CI to test 3.1/3.2/3.3,
upgrade actions/checkout (v2 -> v4) and replace the deprecated
actions/cache@v1 with ruby/setup-ruby's bundler-cache. Bump gemspec
required_ruby_version and rubocop TargetRubyVersion to 3.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nokogiri 1.19.3 requires Ruby >= 3.2 (not 3.1 as initially attempted),
so drop 3.1 from the CI matrix and bump gemspec/rubocop accordingly.
Also replace map { ... }.compact with filter_map flagged by RuboCop
after raising TargetRubyVersion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RuboCop 1.22.3 (pinned in Gemfile.lock) doesn't recognize
TargetRubyVersion 3.2+, so cap it at 3.1 — runtime code still runs on
3.2+. Ruby 3.4 dropped libdecimal/bigdecimal from default gems and
json-schema 4.3 fails to load it; keep the matrix at 3.2/3.3 to avoid
scope creep into transitive dependency cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The cop wants required_ruby_version (>= 3.2, dictated by nokogiri
1.19.3) to match TargetRubyVersion, but RuboCop 1.22.3 doesn't
recognize 3.2 as a valid TargetRubyVersion. Disable the cop rather
than pinning rubocop or splitting nokogiri across versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ceritium ceritium merged commit cf762ca into master May 10, 2026
2 checks passed
@ceritium ceritium deleted the fix/nokogiri-1.18.9-security branch May 10, 2026 18:42
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