Skip to content

chore(deps): update dependency nokogiri to v1.19.3 [security]#3402

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

chore(deps): update dependency nokogiri to v1.19.3 [security]#3402
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/data-rubygems-nokogiri-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

@renovate-bot renovate-bot commented Apr 27, 2026

This PR contains the following updates:

Package Change Age Confidence
nokogiri 1.18.91.19.3 age confidence

Nokogiri does not check the return value from xmlC14NExecute

GHSA-wx95-c6cv-8532

More information

Details

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.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Nokogiri CSS selector tokenizer has regular expression backtracking

GHSA-c4rq-3m3g-8wgx

More information

Details

Summary

Nokogiri's CSS selector tokenizer contains regular expressions whose construction may result in exponential regex backtracking on adversarial selectors. Three ReDoS vectors are addressed in this release:

  1. String-literal tokenization on certain unterminated quoted-string input.
  2. String-literal tokenization on a separate class of hex-escape-rich input.
  3. Identifier tokenization on hex-escape-rich input.

The public CSS selector methods that funnel through the affected tokenizer are Nokogiri::CSS.xpath_for, Node#css, Node#at_css, Searchable#search, and CSS::Parser#parse.

Mitigation

Upgrade to Nokogiri >= 1.19.3.

If users are unable to upgrade, two options are available:

  • Avoid the use of attacker-controlled text in CSS selectors. Applications that only pass developer-authored selectors to Nokogiri are not directly exposed.
  • Set global Regexp.timeout (Ruby 3.2+, JRuby 9.4+) to bound parse time.
Severity

The Nokogiri maintainers have evaluated this as High Severity (CVSS 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

An attacker able to inject user-supplied text into a CSS selector parse method can cause exponential backtracking, resulting in a potential denial of service.

Resources
Credit

Vector 1 was responsibly reported by @​colby-swandale. Vectors 2 and 3 were discovered by @​flavorjones during the response to the original report.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Nokogiri XSLT transform has a memory leak

GHSA-v2fc-qm4h-8hqv

More information

Details

Summary

Nokogiri's Nokogiri::XSLT::Stylesheet#transform leaks a small heap allocation when passed a Ruby string parameter containing a null byte.

For applications that pass attacker-controlled input through XSLT.transform parameters, this may be a vector for a denial of service attack against long-running processes.

Mitigation

Upgrade to Nokogiri >= 1.19.3.

Users may also be able to mitigate this issue without upgrading by validating untrusted transform parameters before passing them to Nokogiri::XSLT::Stylesheet#transform.

Severity

The Nokogiri maintainers have evaluated this as Moderate Severity, CVSS 5.3.

Each leaked allocation is approximately 24–32 bytes, so meaningful memory growth requires sustained attacker-controlled traffic at high call rates. The bug does not cause memory corruption, information disclosure, or any change in the behavior of the transform itself, and the string-handling exception is raised as expected.

Applications that do not pass raw attacker-controlled bytes to XSLT parameters are unlikely to be affected in practice.

Resources
Credit

This vulnerability was responsibly reported by @​Captainjack-kor.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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 Apr 27, 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 gem from version 1.18.9 to 1.19.2 in the Gemfile.lock. A review comment highlights a discrepancy between the version implemented in the code and the version referenced in the pull request title and description, suggesting that the metadata be updated to ensure a clear audit trail.

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.

medium

There is a discrepancy between the version updated in the code (1.19.2) and the version mentioned in the pull request title and description (1.19.1). While 1.19.2 is a newer version that includes the required security fix, the PR metadata should be updated to accurately reflect the changes being merged to maintain a clear audit trail.

@renovate-bot renovate-bot changed the title chore(deps): update dependency nokogiri to v1.19.1 [security] chore(deps): update dependency nokogiri to v1.19.3 [security] May 8, 2026
@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 395c97f to 837bcbf Compare May 8, 2026 16:06
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 8, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 837bcbf to 3ee252c Compare May 13, 2026 21:16
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 13, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 3ee252c to 653fca1 Compare May 14, 2026 22:33
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 14, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 653fca1 to 28d09fe Compare May 15, 2026 15:44
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 15, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 28d09fe to d7fbf95 Compare May 15, 2026 18:51
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 15, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from d7fbf95 to d7491ae Compare May 15, 2026 23:25
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 15, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from d7491ae to cc347f0 Compare May 16, 2026 01:19
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 16, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from cc347f0 to ee3f178 Compare May 16, 2026 04:12
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 16, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from ee3f178 to 6149c89 Compare May 16, 2026 04:43
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 16, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 6149c89 to 03e8917 Compare May 16, 2026 04:53
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 16, 2026

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/data-rubygems-nokogiri-vulnerability branch from 03e8917 to e8447e9 Compare May 16, 2026 05:11
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented May 16, 2026

/gcbrun

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