Skip to content

chore(deps): update dependency nokogiri to v1.19.1 [security]#3398

Open
renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
renovate-bot:renovate/data-rubygems-nokogiri-vulnerability
Open

chore(deps): update dependency nokogiri to v1.19.1 [security]#3398
renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
renovate-bot:renovate/data-rubygems-nokogiri-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
nokogiri 1.18.91.19.1 age confidence

GitHub Vulnerability Alerts

GHSA-wx95-c6cv-8532

Summary

Nokogiri's CRuby extension fails to check the return value from xmlC14NExecute in the method Nokogiri::XML::Document#canonicalize and Nokogiri::XML::Node#canonicalize. When canonicalization fails, an empty string is returned instead of raising an exception. This incorrect return value may allow downstream libraries to accept invalid or incomplete canonicalized XML, which has been demonstrated to enable signature validation bypass in SAML libraries.

JRuby is not affected, as the Java implementation correctly raises RuntimeError on canonicalization failure.

Mitigation

Upgrade to Nokogiri >= 1.19.1.

Severity

The maintainers have assessed this as Medium severity. Nokogiri itself is a parsing library without a clear security boundary related to canonicalization, so the direct impact is that a method returns incorrect data on invalid input. However, this behavior was exploited in practice to bypass SAML signature validation in downstream libraries (see References).

Credit

This vulnerability was responsibly reported by HackerOne researcher d4d.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented Mar 30, 2026

/gcbrun

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the nokogiri dependency in Gemfile.lock from version 1.18.9 to 1.19.2 to address a security vulnerability. Feedback suggests correcting the PR metadata to match the version used and updating the Gemfile constraint to ~> 1.19 to prevent future downgrades to vulnerable versions.

net-ssh (>= 4.0.0)
netrc (0.11.0)
nokogiri (1.18.9)
nokogiri (1.19.2)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The Gemfile.lock has been updated to version 1.19.2, which addresses the security vulnerability (GHSA-wx95-c6cv-8532). However, there are two points of concern:

  1. PR Metadata Mismatch: The PR title and description specify version 1.19.1. While 1.19.2 is a valid patch release containing the fix, the PR metadata should be updated for accuracy.
  2. Dependency Constraint: The DEPENDENCIES section (line 812) still shows nokogiri (~> 1.18), indicating that the Gemfile itself was not updated. To prevent the accidental reintroduction of vulnerable versions (like 1.18.9) in future dependency resolutions, the Gemfile should be updated to require nokogiri version 1.19.1 or higher (e.g., ~> 1.19).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants