Update dependency nokogiri to v1.19.3 [SECURITY]#1497
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Update dependency nokogiri to v1.19.3 [SECURITY]#1497renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.19.1→1.19.3Nokogiri 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:
The public CSS selector methods that funnel through the affected tokenizer are
Nokogiri::CSS.xpath_for,Node#css,Node#at_css,Searchable#search, andCSS::Parser#parse.Mitigation
Upgrade to Nokogiri
>= 1.19.3.If users are unable to upgrade, two options are available:
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:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
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#transformleaks a small heap allocation when passed a Ruby string parameter containing a null byte.For applications that pass attacker-controlled input through
XSLT.transformparameters, 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:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.