[Security] Bump nokogiri from 1.10.10 to 1.11.4
Bumps nokogiri from 1.10.10 to 1.11.4. This update includes security fixes.
Vulnerabilities fixed
Sourced from The GitHub Security Advisory Database.
XXE in Nokogiri
Severity
Nokogiri maintainers have evaluated this as Low Severity (CVSS3 2.6).
Description
In Nokogiri versions <= 1.11.0.rc3, XML Schemas parsed by
Nokogiri::XML::Schemaare trusted by default, allowing external resources to be accessed over the network, potentially enabling XXE or SSRF attacks.This behavior is counter to the security policy followed by Nokogiri maintainers, which is to treat all input as untrusted by default whenever possible.
Please note that this security fix was pushed into a new minor version, 1.11.x, rather than a patch release to the 1.10.x branch, because it is a breaking change for some schemas and the risk was assessed to be "Low Severity".
Affected Versions
Nokogiri
<= 1.10.10as well as prereleases1.11.0.rc1,1.11.0.rc2, and1.11.0.rc3Mitigation
... (truncated)
Affected versions: <= 1.10.10
Sourced from The Ruby Advisory Database.
Nokogiri::XML::Schema trusts input by default, exposing risk of an XXE vulnerability
Description
In Nokogiri versions <= 1.11.0.rc3, XML Schemas parsed by
Nokogiri::XML::Schemaare trusted by default, allowing external resources to be accessed over the network, potentially enabling XXE or SSRF attacks.This behavior is counter to the security policy followed by Nokogiri maintainers, which is to treat all input as untrusted by default whenever possible.
Please note that this security fix was pushed into a new minor version, 1.11.x, rather than a patch release to the 1.10.x branch, because it is a breaking change for some schemas and the risk was assessed to be "Low Severity".
Affected Versions
Nokogiri
<= 1.10.10as well as prereleases1.11.0.rc1,1.11.0.rc2, and1.11.0.rc3Mitigation
... (truncated)
Patched versions: >= 1.11.0.rc4 Unaffected versions: none
Sourced from The GitHub Security Advisory Database.
Update packaged dependency libxml2 from 2.9.10 to 2.9.12
Summary
Nokogiri v1.11.4 updates the vendored libxml2 from v2.9.10 to v2.9.12 which addresses:
- CVE-2019-20388 (Medium severity)
- CVE-2020-24977 (Medium severity)
- CVE-2021-3517 (Medium severity)
- CVE-2021-3518 (Medium severity)
- CVE-2021-3537 (Low severity)
- CVE-2021-3541 (Low severity)
Note that two additional CVEs were addressed upstream but are not relevant to this release. CVE-2021-3516 via
xmllintis not present in Nokogiri, and CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).Please note that this advisory only applies to the CRuby implementation of Nokogiri
< 1.11.4, and only if the packaged version of libxml2 is being used. If you've overridden defaults at installation time to use system libraries instead of packaged libraries, you should instead pay attention to your distro'slibxml2release announcements.Mitigation
Upgrade to Nokogiri
>= 1.11.4.
... (truncated)
Affected versions: < 1.11.4
Release notes
Sourced from nokogiri's releases.
1.11.4 / 2021-05-14
Security
[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:
Note that two additional CVEs were addressed upstream but are not relevant to this release. CVE-2021-3516 via
xmllintis not present in Nokogiri, and CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).Please see nokogiri/GHSA-7rrm-v45f-jp64 or #2233 for a more complete analysis of these CVEs and patches.
Dependencies
- [CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)
1.11.3 / 2021-04-07
Fixed
- [CRuby] Passing non-
Nodeobjects toDocument#root=now raises anArgumentErrorexception. Previously this likely segfaulted. [#1900]- [JRuby] Passing non-
Nodeobjects toDocument#root=now raises anArgumentErrorexception. Previously this raised aTypeErrorexception.- [CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)
1.11.2 / 2021-03-11
Fixed
- [CRuby]
NodeSetmay now safely containNodeobjects from multiple documents. Previously the GC lifecycle of the parentDocumentobjects could lead to nodes being GCed while still in scope. [#1952]- [CRuby] Patch libxml2 to avoid "huge input lookup" errors on large CDATA elements. (See upstream GNOME/libxml2#200 and GNOME/libxml2!100.) [#2132].
- [CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against
nokogiri.soby includingLDFLAGSinNokogiri::VERSION_INFO. [#2167]- [CRuby]
{XML,HTML}::Document.parsenow invokes#initializeexactly once. Previously#initializewas invoked twice on each object.- [JRuby]
{XML,HTML}::Document.parsenow invokes#initializeexactly once. Previously#initializewas not called, which was a problem for subclassing such as done byLoofah.Improved
- Reduce the number of object allocations needed when parsing an HTML::DocumentFragment. [#2087] (Thanks,
@ashmaroli!)- [JRuby] Update the algorithm used to calculate
Node#lineto be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [#1223, #2177]- Introduce
--enable-system-librariesand--disable-system-librariesflags toextconf.rb. These flags provide the same functionality as--use-system-librariesand theNOKOGIRI_USE_SYSTEM_LIBRARIESenvironment variable, but are more idiomatic. [#2193] (Thanks,@eregon!)- [TruffleRuby]
--disable-staticis now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [#2191, #2193] (Thanks,@eregon!)
... (truncated)
Changelog
Sourced from nokogiri's changelog.
1.11.4 / 2021-05-14
Security
[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:
Note that two additional CVEs were addressed upstream but are not relevant to this release. CVE-2021-3516 via
xmllintis not present in Nokogiri, and CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).Please see nokogiri/GHSA-7rrm-v45f-jp64 or #2233 for a more complete analysis of these CVEs and patches.
Dependencies
- [CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)
1.11.3 / 2021-04-07
Fixed
- [CRuby] Passing non-
Nodeobjects toDocument#root=now raises anArgumentErrorexception. Previously this likely segfaulted. [#1900]- [JRuby] Passing non-
Nodeobjects toDocument#root=now raises anArgumentErrorexception. Previously this raised aTypeErrorexception.- [CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)
1.11.2 / 2021-03-11
Fixed
- [CRuby]
NodeSetmay now safely containNodeobjects from multiple documents. Previously the GC lifecycle of the parentDocumentobjects could lead to nodes being GCed while still in scope. [#1952]- [CRuby] Patch libxml2 to avoid "huge input lookup" errors on large CDATA elements. (See upstream GNOME/libxml2#200 and GNOME/libxml2!100.) [#2132].
- [CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against
nokogiri.soby includingLDFLAGSinNokogiri::VERSION_INFO. [#2167]- [CRuby]
{XML,HTML}::Document.parsenow invokes#initializeexactly once. Previously#initializewas invoked twice on each object.- [JRuby]
{XML,HTML}::Document.parsenow invokes#initializeexactly once. Previously#initializewas not called, which was a problem for subclassing such as done byLoofah.Improved
- Reduce the number of object allocations needed when parsing an
HTML::DocumentFragment. [#2087] (Thanks,@ashmaroli!)- [JRuby] Update the algorithm used to calculate
Node#lineto be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [#1223, #2177]- Introduce
--enable-system-librariesand--disable-system-librariesflags toextconf.rb. These flags provide the same functionality as--use-system-librariesand theNOKOGIRI_USE_SYSTEM_LIBRARIESenvironment variable, but are more idiomatic. [#2193] (Thanks,@eregon!)- [TruffleRuby]
--disable-staticis now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [#2191, #2193] (Thanks,@eregon!)
... (truncated)
Commits
9d69b44version bump to v1.11.4058e87fupdate CHANGELOG with complete CVE information9285251Merge pull request #2234 from sparklemotion/2233-upgrade-to-libxml-2-9-125436f61update CHANGELOG761d320patch: renumber libxml2 patches889ee2atest: update behavior of namespaces in HTML9751d85test: remove low-value HTML::SAX::PushParser encoding test9fcb7d2test: adjust xpath gc test to libxml2's max recursion depth1c99019patch: backport libxslt configure.ac change for libxml2 config82a253fpatch: fix isnan/isinf patch to apply cleanly to libxml 2.9.12- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language -
@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)